Don't Get Rekt

Smart contract bugs / What does it trust?

Bridge and cross-chain message validation

A bridge releases funds for a message, a proof or a deposit that it did not verify correctly. The attacker forges a deposit on one chain and withdraws real funds on the other.

10 real exploits · $558.7M lost

How the attack works

  1. A bridge contract releases or mints tokens when it receives a message that says "a deposit happened on chain A".
  2. The verification has a gap: a default value is accepted as a valid root, the sender chain or sender contract is not checked, or a fake proof passes.
  3. The attacker sends a forged message with no real deposit behind it.
  4. The bridge releases real tokens. Bridges hold large pools, so a single bug can lose hundreds of millions.

Vulnerable and fixed code

Vulnerable
function process(bytes calldata msg_, bytes32 root) external {
    bytes32 h = keccak256(msg_);
    require(acceptableRoot[confirmAt[root]], "root");  // root 0x00 was set as valid
    require(!processed[h]);
    processed[h] = true;
    _release(msg_);
}
Fixed
function lzReceive(Origin calldata o, bytes32, bytes calldata payload, address, bytes calldata)
    external
{
    require(msg.sender == address(endpoint), "endpoint");
    require(o.srcEid == TRUSTED_EID, "src chain");
    require(o.sender == trustedPeer, "src contract");
    (address to, uint256 amt) = abi.decode(payload, (address, uint256));
    require(amt <= rateLimitLeft(), "rate limit");   // cap damage of a bug
    _release(to, amt);
}

Review checklist

  • Check the source chain, the source contract and the messaging endpoint on every message.
  • Never accept a default value (zero root, zero hash, empty proof) as valid. Initialize mappings explicitly.
  • Add rate limits and a pause that a monitor can trigger, so a bug cannot drain the whole pool at once.
  • Mark each message as processed before you release funds.
  • If you use a messaging protocol (LayerZero, Wormhole, CCIP, Hyperlane), follow its integration checklist exactly.

How to test for it

  • Send messages with a wrong source chain, a wrong sender, a zero root and a replayed message. All must revert.
  • Test an upgrade of the bridge: many bridge bugs came from an upgrade that changed a default value.

Real exploits (10)

  • Feb 2, 2022SolanaRust$326.0M

    Wormhole: Wormhole's Solana bridge lost about $326M (120k ETH) when the attacker faked guardian signature verification and minted 120k whETH with no ETH deposited.

    Root cause and fix

    Vulnerable code: Wormhole Solana bridge contract (verify_signatures) · verify_signatures

    The bridge's verify_signatures function passes the signature check to a separate Secp256k1 program. It did not correctly verify the instructions sysvar account it was given, because of a mismatch between the solana_program sysvar instructions code and the solana_program version Wormhole used. The attacker used this to fake a SignatureSet. They then called complete_wrapped with a VAA built in an earlier transaction and minted 120k whETH on Solana with no real deposit on Ethereum. They bridged 93,750 ETH back to Ethereum and sold the rest on Solana.

    What would have stopped it: Check that the sysvar account passed in is the real instructions sysvar. Use a current, consistent solana_program version, and add tests that feed forged signature-set and sysvar accounts. Verify guardian signatures inside the bridge's own trusted code path.

    rekt.news article ↗

  • Aug 1, 2022Ethereum$190.0MAudited

    Nomad Bridge: Nomad Bridge lost $190M because a June upgrade initialised the Replica contract with 0x00 as a trusted root, so any message passed validation in process().

    Root cause and fix

    Vulnerable code: Replica · process()

    After a routine upgrade in June, the Replica contract was initialised with the 0x00 address as a trusted root. process() checks that a message's merkle root is proven. Unproven messages have a default value of 0, which matched the trusted 0x00 root, so every message counted as proven. The first attacker called process() directly with no proof. Many copycats then repeated the same call through Etherscan, swapping in their own address, and drained the bridge over about two and a half hours.

    What would have stopped it: Never allow the zero value as a trusted or confirmed root at initialisation, and add a check that rejects it. Add tests and invariants showing that process() reverts for any message that was never proven, and run them after every upgrade or initialisation.

    rekt.news article ↗Run the exploit (Foundry PoC) ↗

  • May 17, 2026Ethereum$11.6M

    VerusBridge: VerusBridge on Ethereum lost about $11.58M (ETH, tBTC, USDC) when submitImports accepted a forged cross-chain import proof that was not validated properly.

    Root cause and fix

    Vulnerable code: VerusBridge proxy (0x71518580f36feceffe0721f06ba4703218cd7f63), SubmitImports / VerusProof · submitImports()

    The bridge's submitImports path (SubmitImports._createImports, then VerusProof.proveImports, then TokenManager.processTransactions) did not validate the supplied Merkle/MMR transaction proof and its reserve-transfer components strictly enough. The attacker sent a crafted CReserveTransferImport with made-up proof branches and a hand-built transfer component. The bridge treated it as a real import and paid out its ETH, tBTC and USDC to the attacker's receiver in one transaction. The write-up only calls this "insufficient validation", so the exact missing check is not stated.

    What would have stopped it: Verify every import proof against a trusted, confirmed state root. Bind the proven transfer data (amounts, destinations, currencies) to the proof, and reject malformed or inconsistent proof structures. Add invariant checks and per-transaction withdrawal limits on the bridge, and test the verification path with forged proofs.

    Run the exploit (Foundry PoC) ↗

  • Jun 7, 2026Syscoin$8.6M

    Syscoin: Syscoin's NEVM-to-UTXO bridge relay accepted a malformed SPV proof and minted 5 billion unbacked SYS (~$8.56M); the funds were later returned.

    Root cause and fix

    The bridge relay's proof-parsing code misread a specially crafted, malformed SPV proof as valid. It treated a NEVM burn that never happened as confirmed and authorized a mint of 5 billion SYS on the UTXO side. The article says the exact parsing flaw (which field or edge case) has not been publicly confirmed. The attacker then moved the tokens and split them across two wallets.

    What would have stopped it: Make the relay's proof parser strictly validate the proof structure and reject any malformed or unexpected input. Check that every mint on the UTXO side is backed by a confirmed burn event on NEVM. Fuzz and independently audit the relay path, which sits outside normal contract audit scope.

    rekt.news article ↗

  • Jul 23, 2026Ethereum$7.5M

    Verus-Ethereum Bridge (VerusCoin): The Verus-Ethereum Bridge lost about $7.54M to a forged but notarized cross-chain export that was never backed by real value on Verus.

    Root cause and fix

    Vulnerable code: VerusProof · checkExportAndTransfers

    VerusProof.checkExportAndTransfers only checked that the export parsed correctly, that keccak256(serializedTransfers) matched the hash inside it, and that an input spent the previous export. It never checked totalamounts, totalfees, totalburned, the CTxOut nValue, or that the prior export output held enough value to cover the transfers. The attacker made a small legitimate transfer so it became the latest export. They then spent that output in a new Verus transaction with a hand-built export of eight transfers to their own address, and the export was included in a genuinely notarized state root. The import passed every check and the bridge paid out unbacked funds. The May patch to checkCCEValues held, but the same trust boundary had a different gap.

    What would have stopped it: Enforce a value-conservation check on every import: the proven export's total amounts, fees and burns must match the real value locked in the referenced source output, and payouts must not exceed it. Do not treat a matching hash plus Merkle inclusion as proof of backing. After the first exploit, review the whole invariant, not only the one function that was used, and add invariant tests for it.

    rekt.news article ↗

  • Jan 21, 2026SagaEVM$7.0MFork of Ethermint

    Saga: Saga's SagaEVM IBC precompile accepted forged custom IBC messages, letting an attacker mint about $7M of Saga Dollar without collateral.

    Root cause and fix

    Vulnerable code: IBC precompile (Ethermint)

    The IBC precompile, which comes from the original Ethermint codebase, did not properly validate custom IBC messages sent by an EVM helper contract. It treated forged payloads as real collateral deposits, with no check that assets existed on the source chain. The attacker minted Saga Dollar (D) through the Colt protocol, redeemed it against Colt and Mustang for yETH, yUSD and tBTC, bridged the assets to Ethereum via LayerZero, and swapped them for ETH. The article does not name the exact function.

    What would have stopped it: The precompile should only accept IBC messages that come through the verified IBC module path, and it should reject calls from arbitrary contracts. Add tests that feed forged or custom IBC payloads from contracts and confirm they are rejected. Minting protocols should also cap mint rates and have a circuit breaker.

    rekt.news article ↗

  • Jun 10, 2026Secret NetworkRust$4.7MFork of Secret's snip20-ics20 implementation

    Secret Network (Axelar-Secret IBC bridge): Secret Network's Axelar IBC bridge contract lost $4.67M because a fork removed two checks, letting an attacker mint unbacked tokens from a fake chain and redeem them for real assets.

    Root cause and fix

    Vulnerable code: secret1yxjmepvyl2c25vnt53cr2dpn8amknwausxee83

    The Axelar-adapted fork of snip20-ics20 removed parse_voucher_denom(&msg.denom, &packet.src), which checked that the token denom path matched the packet's source channel, and reduce_channel_balance(...), which capped minting to what that channel had deposited. An allow-list of supported denoms replaced them, so the contract asked only whether the denom was supported, not whether the packet was authorized. The attacker opened a permissionless IBC channel from a fake chain, sent forged packets with approved denoms to mint seven unbacked saTokens, and sent them back through channel-61 so Axelar's escrow released real assets. The funds were then moved through Osmosis to Ethereum and exchanges.

    What would have stopped it: Check that the denom path matches the packet's source channel and track a per-channel balance cap on minting. An independent audit of the fork and of the changed trust model would have caught the missing checks. Add monitoring and a pause or circuit breaker on large unusual bridge outflows.

    rekt.news article ↗

  • Apr 13, 2026Ethereum$2.5MAudited, bug out of scope

    Hyperbridge: Hyperbridge lost about $2.5M (first reported as $237k) when a missing leaf_index bounds check in its MMR proof verifier let an attacker forge a message, take admin of the bridged DOT token and mint 1 billion DOT.

    Root cause and fix

    Vulnerable code: HandlerV1 (MerkleMountainRange library) · MerkleMountainRange.CalculateRoot() / VerifyProof(), called from HandlerV1.handlePostRequests

    The Solidity MMR verifier (CalculateRoot/VerifyProof) never enforced leaf_index < leafCount. The attacker sent leafCount=1, leaf_index=1 and proof[0] equal to the expected root. This skipped the single-leaf early exit, so the leaf was never hashed into the root and the function returned proof[0], which matched the root. HandlerV1.handlePostRequests accepted the forged ChangeAssetAdmin request, so TokenGateway gave admin and minter rights on the bridged DOT token to the attacker, who minted 1 billion DOT and dumped it into thin pools.

    What would have stopped it: Add require(leaf_index < leafCount) and validate all proof inputs in the verifier and in the calling handler. Fuzz and test the Merkle library at its edges (out-of-range indices, single-leaf trees), and give custom libraries a specialist Solidity audit as the auditors recommended.

    rekt.news article ↗

  • May 15, 2026Ethereum$628K

    AdsharesBridge (Wrapped ADS): The Adshares bridge to Ethereum lost about $628K when the bridge minter called wrapTo() three times to mint wADS for fake native-chain deposits that did not exist.

    Root cause and fix

    Vulnerable code: Wrapped ADS (0xcfcEcFe2bD2FED07A9145222E8a7ad9Cf1Ccd22A) · wrapTo()

    The bridge minter account called wrapTo() on the Wrapped ADS token with made-up native-chain "from" and "txid" values. Nothing checked that a matching deposit existed on the Adshares chain, so three mints of about 120 million wADS units went to the attacker. Each mint only reduced the minter's allowance. The write-up does not say why the minter acted this way. The cause could be a compromised minter or backend key, or a bridge backend that did not verify deposits. The write-up calls it "Insufficient Validation".

    What would have stopped it: Verify each deposit on the source chain before minting, for example with multi-party attestations or a light-client proof. Keep per-period mint limits and a monitored pause switch. Protect the minter key with a multisig or HSM.

    Run the exploit (Foundry PoC) ↗

  • Aug 19, 2026Base$190KFlash loan

    Allbridge (Core / CCTP integration): Allbridge on Base lost about 189,751 USDC because its CCTPTokenMessenger credited a forged, attested Circle message as a real deposit without checking that any USDC was minted.

    Root cause and fix

    Vulnerable code: CCTPTokenMessenger · receiveCctpMessage()

    CCTPTokenMessenger.receiveCctpMessage() relays an attested Circle message through MessageTransmitterV2, then records receivedMessages[messageHash] = amount - feeExecuted. It reads those values straight from fixed byte offsets in the message body and never checks that a real USDC mint or balance change happened. Circle's attester only signs that a message was submitted, so anyone can write a payload shaped like a CCTP deposit and have it attested. The two guards, destinationCaller and sourceSender, both come from public state. The attacker forged a 1,000,000 USDC "deposit" and called Router.receiveToken(), which treats receivedTokenAmount(messageHash) > 0 as its only solvency check and paid out 999,000 USDC. The attacker flash-loaned the shortfall from Aave V3 and pushed it into the Router so the transfer succeeded. After repaying the loan and premium, the attacker kept about 189.7k USDC.

    What would have stopped it: Credit a cross-chain deposit only after confirming that tokens actually arrived, for example by checking the balance delta, or by accepting only messages that come from Circle's TokenMessenger burn flow. Do not trust the fields of a generic attested message payload. Have the Router check that its balance covers the payout, not just that a message record exists.

    Run the exploit (Foundry PoC) ↗

References

Send a new scam

Describe what happened, or paste a link to the post. Do not include seed phrases, keys or passwords.

Open the post ↗