Cozy Finance Hack

TOTAL LOST $427K
Low Access Control

Summarize with AI

Affected Chain 2025 Incident surface
Recovered $1 Partially recovered
All-Time Rank #1033 By amount stolen
Protocol Type Yield Aggregator Target category

Incident Overview

On August 30, 2025, Cozy Finance, a DeFi hack protection protocol on Optimism, was exploited for $427,000. The attacker exploited a vulnerability in the withdrawal process that allowed anyone to complete another user's redemption, stealing funds that were then bridged to Ethereum mainnet and deposited into Tornado Cash for laundering.

The vulnerability existed in Cozy Finance's two-step redemption process for their CSET contract. Users must first call redeem() to initiate a withdrawal and receive a redemption ID, then call completeWithdraw() with that ID to finalize the withdrawal. However, the completeWithdraw() function failed to verify the caller's identity, allowing anyone to complete withdrawals on behalf of other users by simply providing their redemption ID.

On August 28, victim user 0xd4398 initiated a redemption for $427,000 and received ID 6. The attacker exploited this by calling completeWithdraw() with the victim's redemption ID, completing the withdrawal to their own address and stealing $427,000 USDC from Aave. The exploit was facilitated by the unwrapWrappedAssetViaConnectorForWithdraw function which allows the receiver argument to be any address.

The attacker could have stolen even more, as the same victim had completed another withdrawal of $677,000 just before the attack. After stealing the funds, the attacker bridged them to Ethereum mainnet and deposited them into Tornado Cash for obfuscation.

Exploit tx:

https://optimistic.etherscan.io/tx/0x71e72cae…c0a517

Incident Report

Protocol / Project Cozy Finance
Date of Incident
Attack Technique Access Control
Classification Other
Primary Source View Post-Mortem

Protocol Information

Protocol Type Yield Aggregator
Official Website www.cozy.finance/
Protocol Twitter/X @cozyfinance
Team Anonymous
Source Code Unverified

Market Context at Time of Hack

Token Categories
Asset Management DeFi Ethereum Ecosystem Avalanche Ecosystem DuckSTARTER Poolz Finance Portfolio

What the Attacker Needed to Succeed

Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.

Technical Knowledge Operational-security tradecraft (phishing, malware, leaked seed phrases, or insider access) to obtain treasury signing authority
Capital Required Minimal capital - only enough to cover gas while draining the compromised accounts
On-Chain Access Valid signing authority over the compromised wallets / multisig signers, allowing direct transfer of funds or stake authorization
Target Reconnaissance Identification of Cozy Finance's high-value treasury accounts and the authority / multisig structure controlling them
Execution Speed Speed to drain the compromised accounts before the team detects the breach and revokes signing authority or freezes the assets
Obfuscation Plan A strategy to launder and move stolen funds - typically through mixers, cross-chain bridges, or decentralized DEX swaps to resist tracing

What Auditors Should Check

Could this have been caught in audit? Likely — with a thorough Access Control audit checklist and test coverage

If you're auditing a protocol with similar architecture to Cozy Finance, these are the critical security checks that could have prevented this incident (August 2025).

  • Verify all logic paths related to Access Control are guarded by proper access controls and input validation - see the Access Control Attacks attack class for patterns
  • Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs

Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.

Free Trial

Funds Recovery

Recovered

$1

Net Loss

$427K

Related Attack Classes

The technique used in this hack maps to these vulnerability classes in our security curriculum:

See all Access Control Attacks examples →

Sources & References

Learn to Prevent the Next Cozy Finance

The Cozy Finance hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.

Recreate exploit patterns safely Free Trial