The method permit in YETIToken doesn't check that the address is address(0), this is the default value when the method fail, so with a wrong call, it's possible to call _approve with owner=address(0) and spender=attacker. If there are tokens burned, you will have an allowance with all of these tokens. This could be an evidence of funds for external contracts or dapps.
Handle
0x1f8b
Vulnerability details
Impact
Approve burned tokens from
YETIToken
.Proof of Concept
The method
permit
inYETIToken
doesn't check that the address is address(0), this is the default value when the method fail, so with a wrong call, it's possible to call_approve
withowner=address(0)
andspender=attacker
. If there are tokens burned, you will have an allowance with all of these tokens. This could be an evidence of funds for external contracts or dapps.Tools Used
Manual review.
Recommended Mitigation Steps
Check that
recoveredAddress
is not empty.