Attacker can DOS private party by donating ETH then calling buy
The buy function in a private party's crowdfund contract could be called by anyone, allowing an attacker to donate ETH and then call buy to set the party's total voting power to the purchase price. This could softlock the party because the donated ETH's voting power cannot be claimed, potentially permanently locking the NFT if emergency execution is disabled.
Submitted by 0x52
Party is DOS’d and may potentially lose access to NFT.
Proof of Concept
party = party_ = partyFactory
.createParty(
address(this),
Party.PartyOptions({
name: name,
symbol: symbol,
governance: PartyGovernance.GovernanceOpts({
hosts: governanceOpts.hosts,
voteDuration: governanceOpts.voteDuration,
executionDelay: governanceOpts.executionDelay,
passThresholdBps: governanceOpts.passThresholdBps,
totalVotingPower: _getFinalPrice().safeCastUint256ToUint96(),
feeBps: governanceOpts.feeBps,
feeRecipient: governanceOpts.feeRecipient
})
}),
preciousTokens,
preciousTokenIds
);
BuyCrowdfundBase.sol#L166-L173
function _getFinalPrice()
internal
override
view
returns (uint256)
{
return settledPrice;
}
When BuyCrowdFund.sol successfully completes a buy, totalVotingPower is set to \_getFinalPrice which in the case of BuyCrowdFundBase.sol returns the price at which the NFT was purchased. totalVotingPower is used by the governance contract to determine the number of votes needed for a proposal to pass. If there are not enough claimable votes to meet that threshold then the party is softlocked because it can’t pass any proposals. An attacker could exploit this to DOS even a private party with the following steps:
- Wait for party to be filled to just under quorum threshold
- Donate ETH to the crowdfund contract
- Call BuyCrowdFund.sol#buy. Since it is unpermissioned even for parties with a gatekeeper, the call won’t revert
Since the voting power for the final amount of ETH cannot be claimed, the party is now softlocked. If emergencyExecuteDisabled is true then the party will be permanantly locked and the NFT would effectively be burned. If emergencyExecuteDisabled is false then users would have to wait for PartyDAO to reclaim the NFT.
Recommended Mitigation Steps
Permission to call BuyCrowdFund.sol#buy should be gated if there is a gatekeeper.
merklejerk (PartyDAO) confirmed and commented:
Theoretically possible but there doesn’t seem to be much upside for the attacker. We do think it’s unusual that buy()/bid() can be called by a non-member for a private/gatekept party, so we will add gatekeeping logic there to fix this. We will also cap the callValue (and therefore final price) to
totalContributions.
HardlyDifficult (judge) increased severity to High and commented:
Although it’s without upside, it is a path for the attacker to potentially lock the NFT. Since it can cause a loss of asset for users, this seems to be a High risk issue.
Let me know if I misunderstood.
merklejerk (PartyDAO) commented:
Don’t consider it high because there is a much more straightforward way to softlock a party: contribute normally and don’t ever participate in governance.Oh nvm, this is the private party one. Yeah I’m fine with high.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The buy function lacked access control for private parties, and the final price used for voting power could be inflated by donations that were not claimable.
Impact
The party could be softlocked, and if emergencyExecuteDisabled is true, the NFT would be permanently locked and effectively burned; otherwise, users would have to wait for PartyDAO to reclaim the NFT.
What the attacker needed
Party filled just under quorum; attacker can donate ETH; attacker can call buy
How it was found
- Wait for the party to be filled to just under the quorum threshold.
- Donate ETH to the crowdfund contract.
- Call the buy function, which is unpermissioned even for parties with a gatekeeper.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A private party is a group that pools money to buy an NFT. The contract that manages the purchase had a function that anyone could call, even for private parties. An attacker could add extra money and then trigger the purchase, which made the group's voting system require more votes than anyone could get, so the group got stuck and could not make decisions.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.