CVE-2024-35229 ZKsync Era evaluation order of Yul function arguments
Incorrect evaluation order of Yul function arguments in the ZKsync Era compiler can lead to unexpected contract behavior and potential code execution issues.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-35229?
CVE-2024-35229 is a medium-severity vulnerability in matter-labs era-compiler-solidity, published on 27 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum. Prior to version 1.3.10, there is a very specific pattern `f(a(),b()); check_if_a_executed_last()` in Yul that exposes a bug in evaluation order of Yul function arguments. This vulnerability has been fixed in version 1.3.10. As a workaround, update and redeploy affected contracts.
Weakness: CWE-696
Which versions are affected by CVE-2024-35229?
How do I fix CVE-2024-35229?
No fix has been published for CVE-2024-35229 yet. Limit exposure of the affected software until one is available.
Is CVE-2024-35229 being exploited?
There is no known exploitation of CVE-2024-35229 in the wild and no public exploit code.
Sources
Also known as GHSA-jf9w-7f5g-j95p.