# Previous owner can steal unclaimed bribes from new owner of veNFTVault

Transferring veNFT receipt ownership leaves the old managerAddress intact, letting the previous owner claim unclaimed bribes and vote on the vault.

- Payout: Audit contest
- Severity: medium
- Program: Debita
- Found by: 0xc0ffEE
- Disclosed: 2024-10-31
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-10-debita-judging/issues/875
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-10-debita%3AM-22
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:access-control vuln:business-logic

**Target:** veNFTVault / Receipt-veNFT Aerodrome contract
**Root cause:** veNFTVault.managerAddress is set at vault creation to the original owner and is never updated when the receipt NFT (and thus vault ownership) is transferred.
**Steps:**
1. Deploy vault via Receipt-veNFT with msg.sender as managerAddress
2. Accrue unclaimed bribes in the vault (e.g. 1000 USDC)
3. Transfer receiptID to victim via transferFrom; managerAddress stays as attacker
4. Attacker calls `claimBribesMultiple([vault],[bribes],[tokens])`; require(msg.sender == managerAddress) passes
5. Bribes are SafeERC20.safeTransfer'd to attacker (sender), not the new receipt holder
**How found:** Code review of claimBribesMultiple's managerAddress check versus the vault constructor, noticing managerAddress is set once at creation and never synced to receipt ownership transfers.
**Exploitation:** Attacker sells the veNFT receipt holding unclaimed bribes, then immediately calls claimBribesMultiple while still managerAddress, routing bribe tokens to themselves.
**Insight:** When a contract stores a privileged role at construction and ownership is represented by a separately transferable NFT, check whether every transfer path updates the stored role; stale-role bugs let sellers retain control after sale.

