Owner can steal funds on withdraw by burning wrong Uniswap V3 position liquidity
The vault's decreaseLiquidity function does not verify that the supplied Uniswap V3 position tokenId belongs to the wNxm/stNxm pool. The owner can pass a tokenId from a different pool, causing the vault to burn its own shares and allowing the owner to withdraw more assets while other users' withdrawals are blocked.
Source: https://github.com/sherlock-audit/2025-11-stnxm-by-easedefi-judging/issues/176
Found by
blockace, elolpuer
Summary
From README: If the owner is able to steal the funds that cannot be recovered by the protocol/proxy, then it may be a valid issue (if it leads to Med/High impact).
Owner can pass a tokenId from a different Uniswap V3 pool to decreaseLiquidity(), which will burn vault shares because the function does not verify the token's pool. This results in burning vault-held shares and allows the owner to gain more assets.
Root Cause
decreaseLiquidity() function does not check if tokenId is valid for wNxm/stNxm pool:
function decreaseLiquidity(uint256 tokenId, uint128 liquidity) external onlyOwner update {
//@audit no check for valid tokenId
INonfungiblePositionManager.DecreaseLiquidityParams memory params = ...
nfp.decreaseLiquidity(params);
(uint256 amount0, uint256 amount1) = nfp.collect(
INonfungiblePositionManager.CollectParams(tokenId, address(this), type(uint128).max, type(uint128).max)
);
uint256 stNxmAmount = isToken0 ? amount0 : amount1;
// Burn stNXM that was removed.
if (stNxmAmount > 0) _burn(address(this), stNxmAmount);
...
}
This will allow owner to pass a tokenId from a different Uniswap V3 pool and burn shares to receive more assets during withdrawal.
Internal Pre-conditions
- Vault has some withdraw requests
External Pre-conditions
No response
Attack Path
- Owner creates a withdrawal request using their shares (e.g., when large whales also create withdrawal requests) and waits until it can be finalized.
- Owner creates 2 ERC-20 tokens and deploys a Uniswap V3 pool with them.
- Adds liquidity to the pool and mints an ERC-721 position.
- Transfers the NFT position to the
stNXMcontract. - Calls
decreaseLiquidity()with this position to burn vault shares belonging to others (from others withdrawal requests). - Since the function does not verify that the position belongs to the
wNxm/stNxmpool, it burns vault shares. - With a reduced
totalSupply(), the owner can now withdraw more assets. - Other users lose their ability to finalize withdrawals because the
burn()will be DoSed inwithdrawFinalize()cause this shares already burned by owner.
Impact
Owner steals tokens from vault, other user who had active withdrawal requests lose their tokens.
PoC
No response
Mitigation
Check that tokenId belongs to wNxm/stNxm pool.
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/EaseDeFi/stNXM-Contracts/commit/807170825a6b993412c51e569cd35a191842685e
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 decreaseLiquidity function lacks a check that the tokenId corresponds to the wNxm/stNxm Uniswap V3 pool.
Impact
The owner can steal tokens from the vault, and other users with active withdrawal requests lose their tokens and cannot finalize withdrawals.
What the attacker needed
Owner role; Vault has active withdrawal requests
The fix
The protocol team fixed this issue by adding a check that the tokenId belongs to the wNxm/stNxm pool.
How it was found
- Owner creates a withdrawal request using their shares and waits until it can be finalized.
- Owner creates two ERC-20 tokens and deploys a Uniswap V3 pool with them.
- Owner adds liquidity to the pool and mints an ERC-721 position.
- Owner transfers the NFT position to the stNXM contract.
- Owner calls decreaseLiquidity() with this position to burn vault shares belonging to others.
- With reduced totalSupply(), the owner can withdraw more assets, and other users cannot finalize withdrawals because burn() is DoSed.
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.
The vault lets its owner reduce liquidity using a position identifier. The code never checks that this identifier actually belongs to the vault's own trading pool. So the owner can use a fake position from another pool to make the vault destroy some of its own shares, which increases the owner's share of the remaining assets.
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.