The MembershipFactory
contract maps DAOs to ENS names, which can potentially expire or be transferred to new owners. In the case of expiration, the new owner of the ENS name is unable to create a DAO because the mapping still points to the previous owner's DAO configuration. This limitation can hinder the functionality of the contract and restrict legitimate users from utilizing the DAO creation features.
The createNewDAOMembership
function checks if a DAO already exists by verifying the mapping of ENS names to DAO addresses:
If the ENS name has expired or been transferred, the new owner will not be able to create a new DAO with that ENS name, as the mapping will still reference the previous DAO configuration. This creates a situation where the new owner is effectively locked out of creating a DAO, even though they have rightful ownership of the ENS name.
A DAO is created and mapped to an ENS name (e.g., example.dao
).
the ENS name expires and a new owner bought it .
The new owner attempts to create a new DAO using the same ENS name.
The createNewDAOMembership
function fails with the error "DAO already exist," preventing the new owner from creating a DAO.
The impact of this vulnerability is significant, as it can lead to:
new owners of ENS names are unable to create DAOs.
A decrease in the overall usability and flexibility of the MembershipFactory contract.
Manual code review
The issue arises from mapping the DAOs to ENS names without considering the change of ownership of ENS names ( which is frequent for popular ENS names ) . Some mitigations could be :
Implement ENS Ownership Verification: Before allowing the creation of a DAO, verify that the caller is the current owner of the ENS name. This can be done using an ENS resolver to check ownership.
Allow DAO Re-creation: Introduce a mechanism to allow the new owner of an expired or transferred ENS name to create a new DAO, potentially by clearing the existing mapping if the ENS name is no longer valid.
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.