A single user is able to fill all dao positions because there is no limits of how many times he can join a dao
The vulnerability occours because MembershipFactory::joinDAO method doesnt have a limit of how much times can be called by a single address.
Because of this, a single user (using a contract for eg) can fill all available space in dao by calling MembershipFactory.sol::joinDAO N times, where N is the sum of all dao.tierconfigs.amounts leaving no space for other users to joinDAO.
In the following proof of concept, a single user is able, to fill all positions for a tier in a dao
Add the following code in test/MembershipFactory.test.ts in "Join DAO" section:
Run test, first start a localnode, USE ANVIL cause hardhat node fails:
Exec test with:
It will take a while, but observe a single user can fill all dao positions
Denial of Service, making other users unable to join a dao, however attacker must spends funds to do so, so, impact is low
Manual Review
Limit number of times a single user can join a DAO, for eg, to two for tier (to be able to upgradeTier)
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.