CVE-2024-34704

era-compiler-solidity contains a `xor(zext(cmp), -1)` misoptimization

MEDIUM
5.9
CVSS Score
Published: May 13, 2024 at 07:13 PM UTC
Updated: June 17, 2026 at 07:33 AM UTC
1 product affected across 1 vendorZksolc

Using era-compiler-solidity by matter-labs?

Get instant alerts when new vulnerabilities affect era-compiler-solidity - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.9
Exploit prediction
EPSS 0.5%
SSVC
PoC

Description

era-compiler-solidity is the ZKsync compiler for Solidity. The problem occurred during instruction selection in the `DAGCombine` phase while visiting the XOR operation. The issue arises when attempting to fold the expression `!(x cc y)` into `(x !cc y)`. To perform this transformation, the second operand of XOR should be a constant representing the true value. However, it was incorrectly assumed that -1 represents the true value, when in fact, 1 is the correct representation, so this transformation for this case should be skipped. This vulnerability is fixed in 1.4.1.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≤ 1.4.01.2.0 ≤ v < 1.4.11.2.0
Affected range stops below 1.4.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.9MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-682

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card