How a Missed Bug Review Led to a $5.7 Million Ethereum-Compatible Chain Hack
A critical flaw in Cosmos EVM, the software that lets Cosmos blockchains run Ethereum-style applications, went undetected for months before attackers exploited it to steal approximately $5.7 million across six networks between August 20 and August 25. The breach exposed a cascade of security missteps, from an initial misassessment by Cosmos Labs to a rushed patch release and an accidental public disclosure of the exploit method.
What Went Wrong With the Initial Bug Review?
A security researcher first reported the vulnerability to Cosmos Labs' bug bounty program on April 25, according to a technical post-mortem published by Cosmos Labs on August 29. The flaw involved an integer underflow, a type of arithmetic error where a number subtracted past zero and wrapped around to an extremely large value. Cosmos Labs' testing team attempted to reproduce the attack but concluded that live Cosmos EVM networks were not vulnerable based on their configuration.
Because testers believed production networks were safe, Cosmos Labs addressed the vulnerability through a "silent, public patch process" rather than issuing a private security advisory. This meant the fix was released publicly without explaining what it addressed. Cosmos Labs has used this silent patching approach for 37 vulnerabilities over the past 13 months, according to the post-mortem.
Cosmos Labs
The assessment proved catastrophically wrong. Independent researchers confirmed in early August that the bug affected all Cosmos EVM chains. Cosmos Labs then obscured the fix and released an updated patch on August 19 at 7:01 p.m. ET, with release notes mentioning only "important" security fixes without specifics. The first attack began just 20 hours later, on August 20 at 3:06 p.m. ET.
How Did the Attacker Exploit the Integer Underflow?
The exploit worked through a two-step mathematical trick. The attacker first set up an account holding locked tokens, then delegated more tokens to a validator than the account could actually spend. This caused the account's balance to subtract past zero, triggering an underflow that wrapped the value around to 2^256-1, an 78-digit number representing the maximum possible value in the system.
In the second step, the attacker reversed the arithmetic. By sending this inflated balance to a target account, the attacker pushed that account past the same ceiling, causing it to overflow and wrap back down. The result: the attacker held the target's tokens while the target was left with nothing. Notably, no new tokens were created; the total supply remained unchanged, making the attack harder to detect.
Which Blockchains Were Hit and How Much Was Lost?
Six Cosmos EVM-compatible blockchains were targeted. MANTRA Chain suffered the largest loss, with 720.9 million MANTRA tokens worth approximately $3.6 million drained from two addresses: the network's burn address and a dormant multisig wallet. TAC, which brings decentralized finance (DeFi) applications to TON and Telegram users, lost nearly 3 billion TAC tokens from its staking pool on August 22, with about 1.2 billion sold on BNB Chain for roughly $950,000. KiiChain, focused on foreign exchange infrastructure, lost about 148 million KII tokens the same evening, with 64.6 million KII sold for approximately $1.6 million.
Three additional chains were attacked using the same method but were not named in Cosmos Labs' post-mortem. Blockchain analytics firm Bubblemaps identified Nesa, an artificial intelligence-focused blockchain, as one of the affected chains. The Nesa attacker bought about $250,000 of NES tokens, bridged them to the Nesa network, inflated the balance 200-fold using the bug, and moved $50 million of NES back to Ethereum. However, extreme slippage from depleted trading pools limited the attacker's profit to approximately $60,000.
Why Was the 20-Hour Window So Dangerous?
MANTRA Chain's post-mortem highlighted the impossibility of responding to the threat in the time available. "Twenty hours was not a realistic window in which to assess, build, test and coordinate a state-breaking upgrade across 38 independent validators, particularly without a vulnerability-specific advisory," MANTRA stated. The chain also noted that the patch release notes did not describe what the fix addressed, leaving operators unaware of the severity.
The situation worsened when a developer at Push Chain filed a public code change on August 20 at 3:16 a.m. ET, approximately 12 hours before the first theft. The disclosure described the vulnerability, its exploitation path, and credited security firm Hacken's audit. Cosmos Labs called this public disclosure of an exact exploit path "highly unusual" and noted it increased the risk of an attack. MANTRA's post-mortem stated: "The security finding was filed 11 hours and 45 minutes before the attacker's first probe".
How to Strengthen Blockchain Security Disclosure Practices
- Implement Private Patch Distribution: Use private patch distribution channels for all vulnerabilities affecting live networks, not silent public patches. This gives operators time to upgrade before attackers can reverse-engineer the fix from public code changes.
- Require Detailed Security Advisories: Always issue vulnerability-specific advisories that explain what was fixed and why it matters. Operators need this information to prioritize patching and coordinate upgrades across independent validators.
- Establish Backport Expectations: Define clear timelines for backporting security fixes to older versions and communicate these expectations to all downstream projects. MANTRA formally raised this issue with Cosmos maintainers, seeking "clearer disclosure practices and defined backport expectations for security-relevant fixes."
- Coordinate Disclosure Timing: Align the timing of patch releases with security advisories to ensure operators have adequate notice before exploit details become public. A 20-hour window is insufficient for coordinating upgrades across decentralized networks.
What Happened After the Attacks?
MANTRA Chain halted at 7:13 p.m. ET on August 20, resuming about 30 hours later on patched software without rolling back transactions. The halt froze approximately 38 million MANTRA in the attacker's wallet, but the attacker had already sent 94.7 percent of stolen tokens to a single exchange deposit address across 15 transfers. Cosmos Labs reported that the attacker's centralized exchange accounts "have been frozen pending investigation by the relevant authorities".
Cosmos Labs
MANTRA also noted that the attack went undetected for nearly four hours because the burn address is treated as immovable, so monitoring systems did not cover transfers from it. This delay gave the attacker time to drain the dormant multisig wallet before the theft was discovered. A 472.70 MANTRA withdrawal from a customer account at a centralized exchange paid the gas fees for the entire attack, according to MANTRA's analysis.
The incident underscores the tension between transparency and security in decentralized networks. While open-source code and public patch processes support the ethos of blockchain development, they can inadvertently create windows of vulnerability when security assessments are incorrect or when disclosure practices lack coordination. MANTRA's formal complaint to Cosmos maintainers signals that the ecosystem's largest projects are now demanding more rigorous security governance to prevent similar cascades of failures.