The following propose function is callable by any active member. If an active member becomes malicious, she or he can call propose by providing meaningless inputs for many times. This will create many meaningless proposals and emit many meaningless Proposed events. As a result, the frontend can be spammed and become less efficient. The user experience for other governance members can be degraded as well.
Lines of code
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/party/PartyGovernance.sol#L526-L549
Vulnerability details
Impact
The following
propose
function is callable by any active member. If an active member becomes malicious, she or he can callpropose
by providing meaningless inputs for many times. This will create many meaningless proposals and emit many meaninglessProposed
events. As a result, the frontend can be spammed and become less efficient. The user experience for other governance members can be degraded as well.https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/party/PartyGovernance.sol#L526-L549
Proof of Concept
Please append the following test in
sol-tests\party\PartyGovernanceUnit.t.sol
. This test will pass to demonstrate the described scenario.Tools Used
VSCode
Recommended Mitigation Steps
The number of proposals, which are not executed, canceled, vetoed, or expired, that can be created per user could be capped by a sensible limit.