Wanchain Cardano Bridge
Why it happened
Attack class: Signature replay / forgeryThe validator signed a message with ambiguous field boundaries, so a small authorization could be matched to a much larger redemption.
What would have stopped it
- Unambiguous encoding of signed messages
- Per-redemption amount limits and rate caps
Not scored before the exploit
BlackHart had not scored Wanchain Cardano Bridge before this exploit.
Attackers drained about 515 million NIGHT tokens, roughly $10 million per DeFiLlama and up to $13 million in some reports, from Wanchain's Cardano to BNB Chain bridge. BlockSec Phalcon traced it to the bridge's validator signing a message made of 14 variable-length fields joined with no separators, so one signature for about 3,110 NIGHT could be reused for redemptions of hundreds of millions. The tokens were sold on decentralized exchanges and NIGHT fell more than 30%. Wanchain took the bridge offline, and the Midnight Foundation said its own network and validators were not affected.
The attacker reused one valid redemption authorization against the bridge's TreasuryCheck validator on Cardano to redeem far more NIGHT than it covered. The published sources give no transaction or wallet details.
Attack flow
All 4 on-chain stepsThe attack in 3 steps. Step 1, Signature reuse: TreasuryCheck validator (source). Step 2, Drain: Attacker wallets (attacker), about $10M reached this step. Step 3, Sale: Decentralized exchanges (exit).
Step 1: Signature reuse
- SourceTreasuryCheck validatorone authorization for about 3,110 NIGHTreused for over 203M NIGHT
Step 2: Drain
- AttackerAttacker walletsabout 515M NIGHT receivedfrom the bridge treasury
Step 3: Sale
- ExitDecentralized exchangesNIGHT soldprice down over 30%
Why each step worked
- 14 fields joined without separatorsdifferent inputs produced the same signed hash
- Serialization function not used in signed hashmissing controlfunction already in the contract
- No per-redemption amount capmissing controlone transaction moved over 203M NIGHT
- Exchanges moved to freeze linked walletsreported after the sale began
Full forensic detail
Step-by-step reconstruction, root cause, counterfactuals, remediation, and disclosure timeline.
Exploit anatomy
Root cause
Wanchain's Cardano to BNB Chain bridge holds NIGHT in a treasury controlled by an on-chain validator called TreasuryCheck, which releases funds when validators have signed a redemption. Per BlockSec Phalcon, the signed message was built by joining 14 variable-length fields end to end with no delimiter or length marker. Different sets of field values could therefore produce an identical byte string and hash, so one genuine authorization could be matched to a different, much larger redemption. BlockSec notes the contract already included Cardano's data serialization function but the signature hash path did not use it. Wanchain's validator keys were not compromised, per reports, and the Midnight Foundation said its own network was not affected.
Prevention analysis
Using length prefixes or the platform's serialization for every field would have made each signed message map to exactly one redemption.
A cap on how much one redemption or one hour could release would have turned a treasury drain into a small loss.
A review focused on how the signed hash is built would likely have caught fields joined without separators.
Similar incidents
A bridge accepted a message it should not have and released funds on the other side.
A verifier accepted input that did not match what was actually authorized.
Remediation
Timeline
Get your protocol scored across 12 dimensions, or request ongoing coverage.