Odos Protocol experienced a malicious exploit targeting its Limit Order Contracts on the Ethereum Layer 2 network, @base.
A series of coordinated attacks resulted in a cumulative loss of approximately $50,000.
The attacker exploited an arbitrary call vulnerability caused by insufficient input validation in the contract’s logic, enabling them to bypass signature verification mechanisms and execute malicious transactions.
Odos leverages an intent optimization algorithm to provide superior exchange rates for both single-token and multi-token swaps.
The protocol is accessible via a dApp and an API, offering users an efficient way to execute complex swaps while minimizing slippage and maximizing returns.
Its Limit Order Contracts allow users to specify conditions for token swaps, automating execution when these conditions are met.
The isValidSigImpl
function allowed arbitrary calls to a Create2Factory contract using unvalidated user input (factoryCalldata
).
This allowed the attacker to execute malicious deployments.
isValidSignature
function allowed attackers to direct calls to a malicious contract implementing ERC-1271, which always returned a valid signature (ERC1271_SUCCESS
).3. Outcome:
The exploit stemmed from insufficient validation of user inputs and improper handling of key contract functionalities:
create2Factory.call(factoryCalldata)
mechanism allowed arbitrary calls without validating the factoryCalldata
.ERC-1271 Signature Validation Bypass:
_signer
address in the isValidSignature
function was user-controlled, enabling the attacker to utilize a malicious contract that returned valid signatures unconditionally.The exploit could have been mitigated with the following precautions:
factoryCalldata
and create2Factory
parameters in the isValidSigImpl
function to prevent arbitrary calls and malicious contract deployments._signer
address before calling isValidSignature
. This could include:Post-hack, Odos protocol was quick to take action.
Choosing a reputable audit firm like QuillAudits ensures that your protocol undergoes rigorous scrutiny from experienced security professionals.
We specialize in uncovering critical vulnerabilities and providing actionable remediation strategies.
Our expertise helps safeguard your project from attacks, ensuring that security issues are addressed proactively.
Join 1000+ leaders who secured themselves from losing Billion Dollars.
Get Pure Alpha Straight to Your Inbox. Miss this, and you’re missing out.
Insider Secrets - Delivered Right to You. Subscribe now.