Critical Aptos Move VM bug risked $70B before patch, researchers say
Security & Exploits ·
Hexens says a stale-cache flaw in Aptos validator code could have let attackers hijack arbitrary structs and drain assets across chains before it was fixed.
Security researchers at Hexens disclosed a critical vulnerability, titled Arbitrary Struct Hijack in Aptos Move VM, affecting the Aptos Core Move VM Runtime, specifically the module aptos-move/block-executor/src/code_cache_global_manager.rs. The bug affected all versions relying on ModuleCacheManager::check_ready() with the module ID pool flush path, including the latest version at the time of the report, 1.41.5. According to a post from Mudit Gupta, the flaw was disclosed by Hexens and represents what he called the worst kind of bug possible on a chain, since it could allow theft not just on the affected chain but across other chains as well.
The root cause traces to a discrepancy between two internal flush paths. Path A clears all caches together, but Path B, triggered by module ID pool overflow, flushes the module ID pool and struct name index map while leaving the type tag cache untouched. When modules reload, indices restart from zero, colliding with stale entries still held in the ty_tag_cache. This lets the VM read or write to the wrong storage slot via a stale StructTag embedded in the StateKey, producing type confusion in which attacker-controlled structs deserialize victim data and write modifications back into victim storage.
Researchers found the issue generalizes beyond simple structs to generic types such as CoinStore, resource group members, and structs holding capabilities like SignerCapability. Hexens researcher Vahe Karapetyan and the team simulated the exploit using a $3,000 server approximating roughly one-third of the validator network, running over 30 validator nodes with mainnet-shaped stake distribution and organic traffic, achieving a success rate above 90 percent with no insider access or special permissions required.
Direct exposure on Aptos itself was assessed in the low single-digit billions, but Gupta noted the broader systemic risk was far larger because most mint-and-burn bridges, including Chainlink and LayerZero, do not isolate chain risk by default, meaning a single-chain bug could theoretically threaten stablecoins, liquid staking tokens, and other assets across multiple chains. He pointed to Agglayer's pessimistic proofs, which use zk proofs to prevent one chain's compromise from affecting another, as an example of an isolated-risk design, and argued that AI has made it more likely that similar chain bugs will be discovered and exploited going forward.
The vulnerability has been described as patched, according to a corroborating account referenced via leviathan.news, though full technical details on remediation timing and whether any funds were actually affected before the fix remain unclear.