All vulnerabilities
CRITICALWeb3exploited in the wild

WEB3-WORMHOLE-2022

Web3 · Solana · Wormhole

Summary

On February 2, 2022, the Wormhole Solana-Ethereum bridge was exploited for about $326 million (120,000 wETH). On Solana, Wormhole's core bridge confirmed guardian signatures by reading the Instructions sysvar to verify that the Secp256k1 verification instruction had run, but its verify_signatures function received the sysvar as a caller-supplied account and called load_instruction_at against it without checking that the account's address equaled the genuine Instructions sysvar (solana_program::sysvar::instructions::id()). The attacker passed a spoofed account crafted to mimic a successful verification of fabricated guardian signatures, so the program accepted a forged VAA and minted 120,000 wETH with no Ethereum collateral, bridging roughly 93,750 ETH back to Ethereum. The real fix added an explicit address check rejecting any instruction account whose key did not match the sysvar id. Jump Crypto (parent of Wormhole developer Certus One) replaced the full 120,000 ETH the next day to keep the bridge solvent; about $225 million was later clawed back via an English High Court order in February 2023.

How to avoid it in your code

  • Validate every sysvar account by comparing its key to the canonical id before reading from it.
  • Verify the address and owner program of all caller-supplied accounts; never trust position in the accounts array.
  • Use checked sysvar loaders (load_instruction_at_checked, load_current_index_checked) so unverified accounts fail closed.
  • Adopt declarative account constraints (e.g. Anchor address constraints) instead of manual, omittable checks.
  • Deploy security patches to mainnet immediately on merge; a public unpatched fix is an exploit roadmap.

References

Related vulnerabilities

All Web3 →