The decentralized finance (DeFi) protocol Yearn Finance experienced a significant security incident on November 30, 2025, resulting in the theft of approximately $9 million in assets. The attacker exploited a critical vulnerability in a legacy yETH stableswap smart contract, demonstrating remarkable capital efficiency by using a negligible amount of funds (16 wei) to trigger the exploit. The core of the vulnerability was the contract's improper handling of cached state variables, which were not cleared when liquidity was removed. This allowed the attacker to create a state where a tiny deposit was misinterpreted as a 'first deposit' into an empty pool with phantom liquidity, leading to the minting of a virtually infinite number of yETH tokens. The incident highlights the persistent dangers of latent bugs in older, complex smart contracts.
The exploit targeted a flaw in how a legacy yETH smart contract managed its internal accounting, specifically its use of cached variables to save on gas fees.
totalSupply variable of the pool to 0.16 wei.totalSupply as 0, incorrectly interpreted this tiny deposit as the first ever deposit into the pool. Instead of calculating shares based on the 16 wei deposit, it read the stale, inflated values from the cache. This logical flaw caused the contract to mint an astronomical number of yETH tokens (235 septillion) to the attacker's wallet.T1657 - Financial Theft).The exploit resulted in a direct financial loss of $9 million for liquidity providers in the specific legacy yETH pool. While Yearn Finance confirmed that its newer V2 and V3 vaults were unaffected, the incident has several negative impacts:
Detecting such an exploit in real-time is extremely challenging, as it occurs within a single atomic transaction on the blockchain.
Immediate Remediation:
Long-Term Mitigation:
Provide developers with strict guidelines on secure smart contract development, including state management, re-entrancy protection, and proper handling of legacy code.
Implement rigorous auditing and formal verification processes for all smart contracts before deployment and after any major state-changing events.
An attacker exploits a legacy yETH smart contract on Yearn Finance, minting a massive number of tokens.
The attacker drains approximately $9 million in assets from a Balancer pool.
Approximately 1,000 ETH of the stolen funds are moved through the Tornado Cash mixer.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.