TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: medium
Invalid

`TempleGold::_update` whitelist check is not correct

Summary

Whitelisted users can send tokens to anyone, not only to other whitelisted addresses

Vulnerability Details

TempleGold::_update check if sender and receiver are authorized, and revert only of both are not, but should revert if at least one of them is not authorized:

if (!authorized[from] && !authorized[to]) { revert ITempleGold.NonTransferrable(from, to); }

Which means if user is authorized, it does not matter how is receiver, it will pass the check

Impact

Users can send tokens to not authorized users

Tools Used

Manual review

Recommendations

- if (!authorized[from] && !authorized[to]) { revert ITempleGold.NonTransferrable(from, to); }
+ if (!authorized[from] || !authorized[to]) { revert ITempleGold.NonTransferrable(from, to); }
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.