Reproduced Exploit

Linea TokenBridge — ERC721 becomes permanently one-way

The ERC20 bridge accepts an ERC721 because both expose a transferFrom-shaped call. The NFT is locked and represented as one fungible unit, but the return flow cannot release it.

May 2024zkSyncbridge1 min read

Chain

zkSync

Category

bridge

Date

May 2024

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: 33298-tokenbridgebridgetoken-allows-1-way-erc721-bridging-causing. Standalone Foundry PoC and full write-up: 33298-tokenbridgebridgetoken-allows-1-way-erc721-bridging-causing_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/bridge/missing-validation · vuln/dos/frozen-funds

Key info#

FieldValue
LossNFT stays permanently locked in L1 bridge
ChainLocal synthetic

TL;DR#

The ERC20 bridge accepts an ERC721 because both expose a transferFrom-shaped call. The NFT is locked and represented as one fungible unit, but the return flow cannot release it.

The vulnerable code#

SOLIDITY
IERC721Like(token).transferFrom(msg.sender, address(this), amount); // @> VULN: an ERC721 is accepted as an ERC20 bridge asset and becomes one-way.

Attack walkthrough#

The PoC bridges NFT ID 5, confirms bridge ownership and one L2 unit, catches the failed return path, then asserts ownership is still the bridge.

Diagrams#

sequenceDiagram participant U as User participant B as L1 TokenBridge U->>B: bridge NFT ID 5 B-->>U: mint 1 fungible unit U->>B: bridge back B-->>U: revert

Remediation#

Reject unsupported token standards by requiring ERC20 decimals success or robust interface detection.

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.