Skip to content
Business logic Audit finding Advanced

ArbitraryCallsProposal.sol and ListOnOpenseaProposal.sol safeguards can be bypassed by cancelling in-progress proposal allowing the majority to steal NFT

The safeguards in ArbitraryCallsProposal and ListOnOpenseaProposal can be bypassed by cancelling a proposal mid-execution, leaving NFT approvals in place. A majority could then use an arbitrary call proposal to list the NFT for sale at a very low price and buy it, stealing it from the party.

0x52 Follow

Originally disclosed on Code4rena

Submitted by 0x52

Note: PartyDAO acknowledges that “canceling an InProgress proposal (mid-step) can leave the governance party in a vulnerable or undesirable state because there is no cleanup logic run during a cancel” in the “Known Issues / Topics” section of the contest readme. I still believe that this vulnerability needs to be mitigated as it can directly lead to loss of user funds.

Impact

Majority vote can abuse cancel functionality to steal an NFT owned by the party.

Proof of Concept

ArbitraryCallsProposal.sol implements the following safeguards for arbitrary proposals that are not unanimous:

  1. Prevents the ownership of any NFT changing during the call. It does this by checking the the ownership of all NFTs before and after the call.
  2. Prevents calls that would change the approval status of any NFT. This is done by disallowing the “approve” and “setApprovalForAll” function selectors.

Additionally ListOnOpenseaProposal.sol implements the following safeguards:

  1. NFTs are first listed for auction on Zora so that if they are listed for a very low price then the auction will keep them from being purchased at such a low price.
  2. At the end of the auction the approval is revoked when \_cleanUpListing is called.

These safeguards are ultimately ineffective though. The majority could use the following steps to steal the NFT:

  1. Create ListOnOpenseaProposal with high sell price and short cancel delay
  2. Vote to approve proposal with majority vote
  3. Execute first step of proposal, listing NFT on Zora auction for high price
  4. Wait for Zora auction to end since the auction price is so high that no one will buy it
  5. Execute next step, listing the NFT on Opensea. During this step the contract grants approval of the NFT to the Opensea contract
  6. Wait for cancelDelay to expire
  7. Call PartyGovernance.sol#cancel. This will immediately terminate the Opensea bypassing \_cleanUpListing and keeping the approval to the Opensea contract.
  8. Create ArbitraryCallsProposal.sol that lists the NFT on Opensea for virtually nothing. Since only approval selectors have been blacklisted and the NFT does not change ownership, the proposal does not need to be unanimous to execute.
  9. Approve proposal and execute.
  10. Buy NFT.

Recommended Mitigation Steps

When a proposal is canceled, it should call a proposal specific function that makes sure everything is cleaned up. NFTs delisted, approvals revoked, etc.

merklejerk (PartyDAO) confirmed and commented:

We will block calls to opensea.validate() in Arbitrary call proposals.

HardlyDifficult (judge) commented:

Agree with High risk - in this scenario a majority owner could steal the asset from others in the party.

0xble (PartyDAO) resolved:

Resolved: https://github.com/PartyDAO/partybidV2/pull/139


The original report as published on Code4rena, by 0x52. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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

Likely the cancel function terminates a proposal without running its cleanup logic, so approvals granted during the proposal remain active.

What the attacker needed

Majority control of the party; ability to create and pass proposals; wait for auction and cancel delay

The fix

The project blocked calls to opensea.validate() in arbitrary call proposals, and a pull request was merged to resolve the issue.

How it was found

  1. Create a ListOnOpenseaProposal with a high sell price and a short cancel delay.
  2. Vote to approve the proposal with a majority vote.
  3. Execute the first step, listing the NFT on a Zora auction at a high price.
  4. Wait for the Zora auction to end without any buyer.
  5. Execute the next step, listing the NFT on OpenSea and granting approval to the OpenSea contract.
  6. Wait for the cancel delay to expire, then call cancel to terminate the proposal without cleanup.

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 group of people jointly own an NFT through a smart contract. The contract has rules to stop a majority from selling the NFT cheaply to themselves. This report shows that by cancelling a proposal halfway through, those rules can be skipped, letting the majority buy the NFT for almost nothing.

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.

More by 0x52

View all

211 more disclosed reports, best first.

More from Party Protocol

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.