{"answers":{"affected":"","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-34704 exists.","fix":"No fix has been published for CVE-2024-34704 yet. Limit exposure of the affected software until one is available.","what":"CVE-2024-34704 is a medium-severity vulnerability in matter-labs era-compiler-solidity, published on 13 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-34704 and fix it if it is affected.\n\nWhat it is: CVE-2024-34704 is a medium-severity vulnerability in matter-labs era-compiler-solidity, published on 13 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-34704 exists.\n\nAffected product: matter-labs era-compiler-solidity. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-34704/ (Markdown: https://insights.sbomify.com/CVE-2024-34704/index.md)","id":"CVE-2024-34704","markdown":"https://insights.sbomify.com/CVE-2024-34704/index.md","name":"CVE-2024-34704","record":{"aliases":["GHSA-22pj-7cvw-r3gc"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["other"],"network_reachable":"yes","non_default_config":false,"product_category":"Solidity compiler","requires_auth":"none","summary":"A misoptimization in the ZKsync Solidity compiler incorrectly transforms boolean logic, potentially leading to incorrect smart contract behavior.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-682","name":"Incorrect Calculation"}],"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":false,"headline":"era-compiler-solidity contains a `xor(zext(cmp), -1)` misoptimization","id":"CVE-2024-34704","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"other","year":"2024"},"n_packages":0,"n_references":1,"next":{"headline":"@valtimo/components exposes access token to form.io","id":"CVE-2024-34706"},"packages":[],"prev":{"headline":"Botan Vulnerable to Denial of Service Due to Overly Large Elliptic Curve Parameters","id":"CVE-2024-34703"},"products":["era-compiler-solidity"],"published":"2024-05-13","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["matter-labs"]},"summary":"A misoptimization in the ZKsync Solidity compiler incorrectly transforms boolean logic, potentially leading to incorrect smart contract behavior.","url":"https://insights.sbomify.com/CVE-2024-34704/"}