Skip to content
Access control Audit finding Intermediate

Position can be opened even when the particle position manger does not hold the Uniswap V3 Position NFT

The Particle position manager allowed opening a position without actually holding the Uniswap V3 NFT, as long as the NFT owner had approved the manager as an operator. An attacker could then open a position on behalf of the original owner, reduce the original liquidity, and maintain sufficient premium to avoid liquidation.

ladboy233 Follow

Originally disclosed on Code4rena

Submitted by ladboy233

As long as user approve the PositionManager for as a operator of their NFT position.

Even the particle position manager does not hold the Uniswap V3 NFT.

Anyone can open the position on behalf of the original NFT owner.

The original owner may incapable of calling reclaimLiquidity and the borrower just open the position to reduce the original liquidity, as long as he maintain sufficient premium, he will never be liquidated.

Even if the original own is capable of calling reclaim liquidity, the borrower is still capable of leverage trading for LOAN_TERM length while forcefully reduce the liquidity of original nft. This is because when open the position, the code does not check if the particile position manager hold the Uniswap V3 NFT. The external call to decrease liquidity and collect the token is subject to the check:

https://etherscan.io/address/0xc36442b4a4522e871399cd717abdd847ab11fe88#code#F1#L184

   modifier isAuthorizedForToken(uint256 tokenId) {
        require(_isApprovedOrOwner(msg.sender, tokenId), 'Not approved');
        _;
    }

While user approve ParticlePositionManager is not a normal flow, user approve particlePositionManager does not signal user wants to borrow the fund. Only when the user transfers the NFT into the ParticlePositionManager, the borrower can borrow with lender’s implicit permission.

Recommended Mitigation Steps

Recommendation validating the particle position manager holds the position nft when position is opened.

wukong-particle (Particle) confirmed and commented:

Oh this is very interesting! Basically increase/decrease liquidity only requires approval, as opposed to owning the NFTs. Indeed, only approving Particle doesn’t mean that an LP wants to lend the liquidity. Would be great if there’s a coded PoC but the current report should be sufficient. We will add an ownership check in our contract. Thanks!


The original report as published on Code4rena, by ladboy233. 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

The contract did not verify that the Particle position manager actually held the Uniswap V3 NFT before opening a position; it relied only on the owner's approval.

Impact

An attacker could open a position on behalf of the original NFT owner, reduce the original liquidity, and avoid liquidation by maintaining sufficient premium, even if the owner could reclaim liquidity.

What the attacker needed

NFT owner approves Particle as operator; Particle does not hold the NFT

The fix

The Particle team added an ownership check in their contract to ensure the position manager holds the NFT when a position is opened.

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.

In Uniswap V3, a liquidity position is represented by an NFT. The Particle protocol lets people borrow against such NFTs, but it should only do so when it actually holds the NFT. Here, the contract only checked that the owner had approved it as an operator, not that it owned the NFT. So someone else could open a loan using the victim's NFT and reduce its liquidity.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by ladboy233

View all

47 more disclosed reports, best first.

More from Particle Leverage AMM Protocol Invitational

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.