GambleCashless

The Wormhole Breach: A Forensic Dissection of the $320M Signature Validation Failure

0xMax Macro

The system was designed to be trustless. On February 2, 2022, the Wormhole bridge processing a cross-chain message lost 120,000 wETH — approximately $320 million at the time. The root cause? A single unchecked loop in the signature verification contract.

Code is law, until it isn't.

The Wormhole bridge connects Solana to other chains via a Guardian network. Guardians observe events on one chain and sign Verifiable Action Approvals (VAAs). A VAA contains the payload and at least 13 of 19 Guardian signatures to be considered valid. The flaw was in the Solana side of the contract: the function verify_signatures incorrectly assumed that if the Guardian set provided a valid signature for one position, all subsequent positions could be skipped.

I have audited cross-chain bridge implementations since 2020. This is a classic case of optimistic verification — the code trusted that the input would not be maliciously crafted. The attacker passed a specially crafted guardian_set where the first signature was valid, then set the guardian_set.active flag to zero after that signature. The verification loop terminated early, returning true for an invalid set. The bridge then released the tokens.

Let me walk through the pseudocode equivalent of the vulnerable function:

Market Prices

Coin Price 24h
BTC Bitcoin
$64,768 +1.42%
ETH Ethereum
$1,917.02 +0.63%
SOL Solana
$74.52 +1.31%
BNB BNB Chain
$592.6 +3.62%
XRP XRP Ledger
$1.08 +1.03%
DOGE Dogecoin
$0.0703 +0.27%
ADA Cardano
$0.1697 +4.82%
AVAX Avalanche
$6.44 +0.14%
DOT Polkadot
$0.7685 +0.63%
LINK Chainlink
$8.44 +1.39%

Fear & Greed

25

Extreme Fear

Market Sentiment

Event Calendar

{{年份}}
18
03
unlock Sui Token Unlock

Team and early investor shares released

15
04
halving Bitcoin Halving

Block reward reduced to 3.125 BTC

12
05
halving BCH Halving

Block reward halving event

08
04
upgrade Solana Firedancer

Independent validator client goes live on mainnet

28
03
unlock Arbitrum Token Unlock

92 million ARB released

22
03
unlock Optimism Unlock

Circulating supply increases by about 2%

30
04
upgrade Celestia Mainnet Upgrade

Improves data availability sampling efficiency

10
05
upgrade Ethereum Pectra Upgrade

Raises validator limit and account abstraction

Tools

All →

Altseason Index

43

Bitcoin Season

BTC Dominance Altseason

Gas Tracker

Ethereum 28 Gwei
BNB Chain 3 Gwei
Polygon 42 Gwei
Arbitrum 0.5 Gwei
Optimism 0.3 Gwei

Market Cap

All →
# Coin Price
1
Bitcoin BTC
$64,768
1
Ethereum ETH
$1,917.02
1
Solana SOL
$74.52
1
BNB Chain BNB
$592.6
1
XRP Ledger XRP
$1.08
1
Dogecoin DOGE
$0.0703
1
Cardano ADA
$0.1697
1
Avalanche AVAX
$6.44
1
Polkadot DOT
$0.7685
1
Chainlink LINK
$8.44

🐋 Whale Tracker

🟢
0xafd2...91b5
6h ago
In
24,235 SOL
🟢
0x6ed3...8324
12m ago
In
1,963.55 BTC
🔴
0x5e83...feba
12m ago
Out
1,827,452 USDC

💡 Smart Money

0x6c2c...c135
Early Investor
+$1.0M
80%
0x1589...44f1
Experienced On-chain Trader
+$0.1M
88%
0x3749...62fc
Institutional Custody
+$3.5M
95%