The GivingThanks
contract is vulnerable to Access Control Issues in the updateRegistry
function, which can allow any user to change the address(charity registry) to a contract without restriction which could lead to unauthorized control or access over the donation process.
There is lack of proper access control in the updateRegistry
function in the GivingThanks
contract:
The function can be called by any user, since there is no onlyOwner
or access control modifiers used.
An attacker can call updateRegistry
and set the registry
to their own contract address.
This malicious contract can then manipulate the outcome of the registry.isVerified(charity)
check in the donate
function to verify any given address falsely, then as a result, the attacker can direct donations to a false charity and completely withdraw the user funds.
Attacker can withdraw users' donations to a different address resulting in financial loss.
Verification checks can be bypassed resulting to donation received by a different address.
Manual review of code to identify access control issues and attacks.
Slither was used to detect access control issues.
Introduce Access Control:
```
Likelyhood: High, anyone can change it at anytime Impact: High, can bypass the verification process
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.