The GivingThanks contract contains an unprotected updateRegistry function that allows any address to change the charity registry. This enables malicious actors to control which charities can receive donations by replacing the legitimate registry with a malicious one.
The vulnerability exists in the following function:
Key issues:
No access control on who can update the registry
No validation of the new registry address
No events emitted for tracking changes
This allows attackers to:
Deploy their own malicious registry
Update the GivingThanks contract to use their registry
Control which charities can receive donations
Proof of Concept:
Severity: Medium
Likelihood: High (simple to execute)
Effects:
Attackers can block legitimate charities from receiving donations
Attackers can whitelist their own addresses as valid charities
Disruption of the platform's intended functionality
Loss of trust in the platform
Limitations:
Cannot steal or redirect existing funds
Cannot redirect new donations to different addresses
NFT minting functionality remains intact
Foundry Test Framework
Manual code review
Add owner-only access control to the updateRegistry function:
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.