Reproduced Exploit

Megapot — Attacker can steal JackpotTicketNFTs from JackpotBridgeManager

_bridgeFunds calls _bridgeDetails.to with attacker-supplied calldata after optionally approving USDC. Pointing to at the ticket NFT and data at safeTransferFrom(bridge → thief, victimId) steals custody NFTs; onERC721Received pulls the approved USDC so the balance check passes.

Nov 2025Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Nov 2025

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 64140-h-01-attacker-can-steal-jackpotticketnfts-from-jackpotbridge. Standalone Foundry PoC and full write-up: 64140-h-01-attacker-can-steal-jackpotticketnfts-from-jackpotbridge_exp in the evm-hack-registry mirror.


Reproduction: self-contained Foundry PoC (forge-std only) — no fork. Full trace: output.txt.

AuditVault taxonomy: lang/solidity · platform/code4rena · severity/high · sector/bridge · sector/nft · genome: broken-logic · direct-drain · account-ownership


Key info#

ImpactHIGH — attacker steals custody JackpotTicketNFTs (and drains approved USDC via callback)
ProtocolMegapot
Bug classUser-controlled external call in _bridgeFunds after USDC approve
FindingCode4rena 2025-11-megapot H-01 · #64140
Reporthttps://code4rena.com/reports/2025-11-megapot
SourceAuditVault
StatusAudit finding — reproduced as a standalone local synthetic
Compiler^0.8.24 (PoC)

TL;DR#

_bridgeFunds calls _bridgeDetails.to with attacker-supplied calldata after optionally approving USDC. Pointing to at the ticket NFT and data at safeTransferFrom(bridge → thief, victimId) steals custody NFTs; onERC721Received pulls the approved USDC so the balance check passes.

HARM: victim's ticket NFT moves to the attacker contract; bridge USDC for the claim is drained in the callback.


Root cause#

User-controlled low-level call in _bridgeFunds with no whitelist / RelayTxData validation.

Preconditions#

Bridge holds victim ticket NFTs in custody; attacker has claimable winnings.

Attack walkthrough#

See synthetic test/64140-….sol. Story beats: seed custody → malicious claimWinnings_bridgeFunds external call → NFT stolen.

Diagrams#

flowchart TD A["Attacker claimWinnings"] --> B["_bridgeFunds"] B --> C["approve USDC to thief"] B --> D["call NFT.safeTransferFrom"] D --> E["onERC721Received pulls USDC"] E --> F["balance check passes"] D --> G["Victim NFT now at thief"]

Impact#

Custody NFTs representing cross-chain tickets/winnings can be stolen by any claimer who supplies a malicious RelayTxData.

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.