Crypto news

21.07.2026
11:22

Wanchain Bridge Exploit on Cardano: 515 Million NIGHT Tokens Stolen — Technical Analysis

The cross-chain bridge Wanchain, connecting the Cardano and BNB Chain ecosystems, was subjected to a targeted attack. As a result of the incident, approximately 515 million NIGHT tokens were drained from the bridge's treasury. At the time of the attack, this amount was estimated at $9–13 million, depending on the data source. The Wanchain team promptly confirmed the breach and suspended the bridge's operation pending an investigation.

Cause of Vulnerability: Signature Collision

A preliminary analysis conducted by BlockSec specialists identified a critical error in the code of the TreasuryCheck validator. The problem lies in the non-injective encoding of the signed message. In simple terms, different sets of input data could lead to the same output byte string. This meant the system lost the ability to distinguish between legitimate and fraudulent operations.

The attack mechanism was as follows: the signed message was formed by "raw" concatenation of 14 variable-length fields without using delimiters or length prefixes. Because of this, an attacker could "shift" the boundaries between fields without changing the data itself. The signature remained valid, as it confirmed the overall byte sequence, but the interpretation of those bytes changed. As a result, the hacker could substitute the recipient and transaction amount using the same signature.

The root of the problem is the absence of the SerialiseData function when constructing the hash for the signature. Using Sha3_256(SerialiseData(...)) would guarantee unambiguous field boundaries in CBOR encoding and prevent this class of signature reuse attacks.

Market Consequences and Reactions

The NIGHT token, which is the native asset of the Midnight blockchain (a project developed with support from Input Output), reacted to the incident with a sharp decline. The price collapsed by more than 30% in a day, hitting an all-time low of around $0.016.

It is important to emphasize that the Midnight Foundation promptly stated that the incident was isolated. The Midnight protocol, its validator network, consensus mechanism, and key infrastructure were not affected. The problem exclusively concerned the infrastructure of the third-party Wanchain bridge. The Foundation maintains close contact with the Wanchain team and sees no threat to the operational integrity of the Midnight network.

Analyst's opinion: This incident is another reminder that cross-chain bridges remain one of the most vulnerable links in the DeFi ecosystem. The error at the data encoding level, which led to a signature collision, is a classic example of the "human factor" in smart contract development. For the Cardano and Midnight communities, this is a painful but valuable lesson that should accelerate the adoption of stricter audit standards and formal code verification for all infrastructure layers.