In the MembershipFactory.sol::createNewDAOMembership
function, a vulnerability exists due to the lack of case insensitivity enforcement for the ensname parameter. This vulnerability can allow attackers to create DAOs with identical names but different case variations, potentially leading to impersonation or phishing attacks.
Vulnerability Location: MembershipFactory.sol::createNewDAOMembership
The ensname parameter is directly used to store and retrieve DAO addresses in the getENSAddress mapping. Since this function does not enforce case insensitivity, two DAOs with the same name but different letter cases (e.g., exampleDAO vs. ExampleDao) can be created and registered under different addresses. Attackers could exploit this to impersonate existing DAOs by creating names that visually appear identical, thereby confusing users or stakeholders.
The impact of this vulnerability is classified as Medium. By exploiting this, an attacker can:
• Create DAOs with case-insensitive variants of established names, leading to impersonation.
• Confuse users or DAO members by deploying DAOs with similar names that could be mistaken for legitimate ones.
• Potentially perform phishing attacks, where users interact with a fake DAO believing it to be legitimate.
The vulnerability was identified through:
• Manual Code Review: A manual inspection revealed the missing case insensitivity check for ensname.
1. Standardize ENS Name Storage and Retrieval: To prevent case-insensitive duplicates, ensure that ensname values are standardized (e.g., converted to lowercase) before storage and retrieval. You can apply toLower when checking getENSAddress[daoConfig.ensname] or use Solidity libraries for case standardization.
2. Implement Tests for Case Insensitivity: Add unit tests to verify that case-insensitive versions of the same ensname cannot create multiple DAOs.
3. User Awareness for ENS Naming: If ENS standardization isn’t feasible, notify users to create unique and unambiguous DAO names to avoid visual impersonation risks.
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.