Date: 13.11.2024
GivingThanks
ContractSeverity: High
Description:
In the constructor of the GivingThanks
contract, the registry
variable is incorrectly initialized to CharityRegistry(msg.sender)
instead of using the passed _registry
parameter. This mistake causes the contract to reference a CharityRegistry
instance deployed by the GivingThanks
contract’s owner instead of the intended CharityRegistry
instance. As a result, the GivingThanks
contract may operate with an invalid or unauthorized CharityRegistry
contract, leading to potential vulnerabilities such as unauthorized charity verification or denial of service.
Mitigation:
Modify the constructor to correctly initialize the registry
variable using the provided _registry
parameter:
Likelyhood: High, the parameter is not well used and won't be set. Impact: Low, can be changed with the setter and no one will be able to donate to malicious charity.
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.