Attacker can list an NFT they own and inflate to zero all users’ contributions, keeping the NFT and all the money
When a crowdfund has a maximum price of zero, the NFT lister can contribute a large sum, buy their own NFT, and then pass a unanimous proposal to approve the NFT back to themselves, keeping both the NFT and all contributions. This allows the lister to steal the entire fund.
*Submitted by Trust, also found by smiling*heretic_
Crowdfunds split the voting power and distribution of profits rights according to the percentage used to purchase the NFT. When an attacker lists his own NFT for sale and contributes to it, any sum he contributes will return to him once the sell is executed. This behavior is fine so long as the sell price is fair, as other contributors will receive a fair portion of voting power and equity. Therefore, when a maximum price is defined, it is not considered a vulnerability that an attacker can contribute maximumPrice - totalContributions and take a potentially large stake of the Crowdfund, as user’s have contributed knowing the potential maximum price.
However, when maximum price is zero, which is allowed in BuyCrowdfund and CollectionBuyCrowdfund, the lister of the NFT can always steal the entirety of the fund and keep the NFT. Attacker can send a massive contribution, buy the NFT and pass a unanimous proposal to approve the NFT to his wallet. Attacker can use a flash loan to finance the initial contribution, which is easily paid back from the NFT lister wallet.
It is important to note that there is no way for the system to know if the Crowdfund creator and the NFT owner are the same entity, and therefore it is critical for the platform to defend users against this scenario.
Impact
Any crowdfund with zero maximumPrice configured is subject to NFT lister rug pull and complete takeover of the contribution funds.
Proof of Concept
-
Suppose totalContributions=X. Attacker will prepare flashloan callback which does:
contribute()with the borrowed funds- call BuyCrowdfund’s
buy()with a contract that will purchase the NFT using the large sum - call NFT lister contract’s sendProfit() function which will send attacker the NFT sell amount
- pay back the flash loan
-
Attacker will call flashloan(10,000X) to buy his own NFT and take unanimous holding of created party
-
Attacker will create ArbitraryCallsProposal with a single call to token.approve(ATTACKER, token_id). It is immediately ready for execution because attacker has > 99.99% of votes. Precious approve() is allowed in unanimous proposals.
-
Attacker calls NFT’s
transferFrom()to take back control of the NFT, leaving with the Crowdfund’s contribution and the listed NFT.
Recommended Mitigation Steps
Disable the option to have unlimited maximumPrice for BuyCrowdfund and CollectionBuyCrowdfund contracts. AuctionCrowdfund is already safe by not allowing a zero maximumBid.
merklejerk (PartyDAO) commented:
Duplicate of #17
HardlyDifficult (judge) decreased severity to QA and commented:
See dupe for context. Merging with #198.
TBH I don’t see enough resemblance to #17 for it to be dupped. This submission discusses specifically maximumPrice = 0 which allows attacker to always claim the entire contribution pool to themselves. Would appreciate a second look. @HardlyDifficult disclaimer - this is my submission.
HardlyDifficult (judge) increased severity to Medium and commented:
Yes that is fair. This seems to fall under the known issue “It is possible that someone could manipulate parties by contributing ETH and then buying their NFT that they own.” - although an extreme example and a unique take on that scenario. However given the apparent ease and impact of this attack it seems we can bump this to Medium risk - would be high if not for the general known issue here.
smiling_heretic (warden) commented:
The same is true for 206 (disclaimer: it’s my submission) so I think it should be marked as duplicate of this finding and also upgraded to medium.
HardlyDifficult (judge) commented:
Agree, thanks @SmilingHeretic.
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
Impact
Any crowdfund with zero maximumPrice is subject to NFT lister rug pull and complete takeover of the contribution funds.
What the attacker needed
Crowdfund with maximumPrice set to zero; Attacker is the NFT lister; Access to flash loan
The fix
Disable the option to have unlimited maximumPrice for BuyCrowdfund and CollectionBuyCrowdfund contracts.
How it was found
- Attacker prepares a flash loan callback that contributes borrowed funds, calls buy() to purchase the NFT, calls sendProfit() to receive the sell amount, and repays the flash loan.
- Attacker calls flashloan with a large amount to buy their own NFT and gain near-total voting power.
- Attacker creates an ArbitraryCallsProposal with a single call to approve the NFT to themselves, which passes immediately due to overwhelming votes.
- Attacker calls transferFrom() to take back the NFT, keeping the crowdfund's contributions and the NFT.
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 crowdfund lets many people pool money to buy an NFT. If the maximum price is set to zero, the person selling the NFT can put in a huge amount of money, buy the NFT themselves, and then use their majority vote to send the NFT back to their own wallet. They end up with both the NFT and everyone else's money.
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.