The GivingThanks::updateRegistry
allows anyone to update the registry address without any restriction.
Malicious actors can change the registry to an untrusted contract, allowing unverified charities to receive donations and exposing users to fraudulent activity.
Since the GivingThanks::updateRegistry
has no access control, anyone could potentially modify the registry. This test ensures only the contract owner can update the registry.
By running this test function it shows that it will not revert which is expected, showing that anyone can update the registry by calling GivingThanks::updateRegistry
function making it vulnerable.
Foundry
Restrict GivingThanks::updateRegistry
to only the contract owner by making it onlyOwner
using OpenZeppelin’s Ownable modifier.
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.