Reproduced Exploit

Stake.Link reSDL bridge — stale approval steals returned lock

handleOutgoingRESDL removes the lock owner but does not delete its transfer approval. When the same ID returns to a victim, the stale approved account transfers the lock away.

Dec 2023Otheraccess-control1 min read

Chain

Other

Category

access-control

Date

Dec 2023

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: 29738-a-user-can-steal-an-already-transfered-and-bridged-resdl-loc. Standalone Foundry PoC and full write-up: 29738-a-user-can-steal-an-already-transfered-and-bridged-resdl-loc_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/access-control/missing-check · vuln/bridge/missing-validation

Key info#

FieldValue
LossBridged reSDL lock is stolen from its recipient
ChainLocal synthetic

TL;DR#

handleOutgoingRESDL removes the lock owner but does not delete its transfer approval. When the same ID returns to a victim, the stale approved account transfers the lock away.

The vulnerable code#

SOLIDITY
delete ownerOf[id]; /* FIX: delete tokenApprovals[id]; */ // @> VULN: bridge departure deletes owner but preserves stale transfer approval.

Attack walkthrough#

The seller pre-approves an alternate account, bridges the lock to a victim, and the alternate account calls transferFrom after the lock returns. The local PoC asserts that the attacker is final owner.

Diagrams#

sequenceDiagram participant S as Seller participant B as Bridge pool participant V as Victim S->>B: set stale approval and bridge lock B-->>V: return same lock ID S->>B: approved alternate transfers lock

Remediation#

Delete tokenApprovals[lockId] when outgoing bridging burns or removes lock ownership.

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.