GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

Open Registration Design in the CharityRegistry Contract

Summary

The CharityRegistry contract allows any address to register a charity by calling the registerCharity() function, without any access control or validation mechanisms. This open registration design choice could lead to the registry being populated with spam or malicious entries, potentially undermining the credibility and usefulness of the contract.

Vulnerability Details

The registerCharity() function does not have any restrictions on who can call it. This means that any Ethereum address can invoke the function and add a charity to the registeredCharities mapping, regardless of whether the address is legitimately associated with a real charity.

Impact

The lack of access control in the registerCharity() function could result in the CharityRegistry being flooded with spam or fraudulent entries. This could make it difficult for users, donors to identify legitimate charities within the registry. Over time, the integrity and usefulness of the registry could be compromised, leading to a loss of trust in the system.

Tools Used

  • Manual Code Review

Recommendations

Based on the project's documented design choice to allow open registration, no immediate recommendations for changes are necessary. However, the project maintainers should be aware of the potential risks and ensure that other mechanisms, such as the verifyCharity() function or external processes, are in place to effectively manage and curate the registry.

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.