The updateDAOMembership function in the DAO Membership Factory contract lacks proper validation to ensure that the total number of already minted memberships across all tiers does not exceed the maxMembers limit after an update. This missing check allows a scenario where the DAO could issue more memberships than the intended limit, potentially diluting membership and impacting DAO integrity.
In the updateDAOMembership function, there is no validation to ensure that the sum of minted memberships across all tiers stays within the maxMembers limit of the DAO. Although maxMembers is recalculated based on the updated tier configurations, there’s no check to ensure that this recalculated limit is compatible with the total of existing minted memberships across all tiers.
The vulnerable code is shown below, where there’s no check to ensure the total of minted memberships does not exceed the maxMembers limit:
Here, maxMembers is recalculated based on the updated tiers.
No check exists to ensure the sum of minted memberships across tiers does not exceed the recalculated maxMembers.
PoC:
Deploy a DAO with initial tiers and mint some memberships.
Update the DAO to new tier configurations without verifying total minted memberships.
Check if the DAO allows minting memberships beyond maxMembers.
Allows more memberships than the maxMembers limit, diluting DAO value and exclusivity.
Functions reliant on maxMembers will behave unexpectedly, affecting DAO management.
More memberships than expected could lead to unintended operational costs and gas inefficiencies.
Manual review.
To mitigate this vulnerability, add a check to verify that the sum of minted memberships across all tiers remains within the recalculated maxMembers value. If the total exceeds maxMembers, reject the update to prevent over-minting.
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.