TempleGoldStaking::getReward() allows any user to force out the reward of other users in the contract.
TempleGoldStaking::getReward() allows any user to force out the reward of other users in the contract. TempleGoldStaking::getReward() makes a sub call to _getReward() which contains the logic for reward claiming. And neither of the functions prevent users from forcing other users to claim their reward.
https://github.com/Cyfrin/2024-07-templegold/blob/da199ee9316665e3ea9006ce9c9f5a7fd7cbc605/protocol/contracts/templegold/TempleGoldStaking.sol#L394-L396
The function grants an attacker an unpermissioned access into other users account, albeit limited access.
Manual
Add access control in TempleGoldStaking::getReward() ensures users can only operate on their accounts.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.