Read the docs
TI-2024-30167 Aliases CVE-2024-45056

`fold (xor (shl 1, x), -1) -> (rotl ~1, x)` misoptimization in zksolc

Priority MEDIUM 60CWE-682Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
None · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA.

Summary

zksolc is a Solidity compiler for ZKsync. All LLVM versions since 2015 fold `(xor (shl 1, x), -1)` to `(rotl ~1, x)` if run with optimizations enabled. Here `~1` is generated as an unsigned 64 bits number (`2^64-1`). This number is zero-extended to 256 bits on EraVM target while it should have been sign-extended. Thus instead of producing `roti 2^256 - 1, x` the compiler produces `rotl 2^64 - 1, x`. Analysis has shown that no contracts were affected by the date of publishing this advisory. This issue has been addressed in version 1.5.3. Users are advised to upgrade and redeploy all contracts. There are no known workarounds for this vulnerability.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00403 34th percentileScored 2026-11-07
Fix Fixed era-compiler-solidity (matter-labs): 1.5.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
matter-labsera-compiler-soliditybefore 1.5.31.5.3Patch availableCNA
  • era-compiler-solidity Vendormatter-labs Affected before 1.5.3 Fixed in 1.5.3 Patch available CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:matter-labs:zksolc:*:*:*:*:*:*:*:*before 1.5.3Vulnerablematter-labs
  • cpe:2.3:a:matter-labs:zksolc:*:*:*:*:*:*:*:* Versions before 1.5.3 Vulnerable ·matter-labs

Remediation

  • Fix · CNA era-compiler-solidity (matter-labs) Fixed in 1.5.3

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-45056

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences