{"answers":{"affected":"3 open source packages ship an affected version, including github.com/consensys/gnark. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45039 exists.","fix":"Upgrade github.com/consensys/gnark to 0.11.0 or later.","what":"CVE-2024-45039 is a medium-severity vulnerability in Consensys gnark, published on 6 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-45039 and fix it if it is affected.\n\nWhat it is: CVE-2024-45039 is a medium-severity vulnerability in Consensys gnark, published on 6 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45039 exists.\n\nAffected packages and fixed versions:\n- github.com/consensys/gnark (Go): affected all versions; fixed in 0.11.0\n- github.com/consensys/gnark (Go): affected all versions; fixed in 0.11.0\n- github.com/consensys/gnark (Go): affected all versions; fixed in 0.11.0\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-45039/ (Markdown: https://insights.sbomify.com/CVE-2024-45039/index.md)","id":"CVE-2024-45039","markdown":"https://insights.sbomify.com/CVE-2024-45039/index.md","name":"CVE-2024-45039","record":{"aliases":["GHSA-q3hw-3gm4-w5cr","GO-2024-3122"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Go zk-SNARK library","requires_auth":"none","summary":"A soundness flaw in gnark allows provers to manipulate commitments in circuits using multiple commitments, potentially bypassing verification checks.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"gnark-crypto","vendor":"consensys"}],"cvss":{"score":6.2,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"gnark is a fast zk-SNARK library that offers a high-level API to design circuits. Versions prior to 0.11.0 have a soundness issue - in case of multiple commitments used inside the circuit the prover is able to choose all but the last commitment. As gnark uses the commitments for optimized non-native multiplication, lookup checks etc. as random challenges, then it could impact the soundness of the whole circuit. However, using multiple commitments has been discouraged due to the additional cost to the verifier and it has not been supported in the recursive in-circuit Groth16 verifier and Solidity verifier. gnark's maintainers expect the impact of the issue be very small - only for the users who have implemented the native Groth16 verifier or are using it with multiple commitments. We do not have information of such users. The issue has been patched in version 0.11.0. As a workaround, users should follow gnark maintainers' recommendation to use only a single commitment and then derive in-circuit commitments as needed using the `std/multicommit` package.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"gnark's Groth16 commitment extension unsound for more than one commitment","id":"CVE-2024-45039","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"other","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"gnark's commitments to private witnesses in Groth16 as implemented break zero-knowledge property","id":"CVE-2024-45040"},"packages":[{"ecosystem":"Go","fixed":["0.11.0"],"introduced":["0"],"last_affected":[],"package":"github.com/consensys/gnark","purl":null,"source":"GHSA-q3hw-3gm4-w5cr"},{"ecosystem":"Go","fixed":["0.11.0"],"introduced":["0"],"last_affected":[],"package":"github.com/consensys/gnark","purl":"pkg:golang/github.com/consensys/gnark","source":"GHSA-q3hw-3gm4-w5cr"},{"ecosystem":"Go","fixed":["0.11.0"],"introduced":["0"],"last_affected":[],"package":"github.com/consensys/gnark","purl":"pkg:golang/github.com/consensys/gnark","source":"GO-2024-3122"}],"prev":{"headline":"Device crash via malformed MQTT packet when downlink is enabled in Meshtastic device firmware","id":"CVE-2024-45038"},"products":["gnark"],"published":"2024-09-06","related":[{"cvss_score":9.8,"headline":"Duplicate Advisory: Consensys gnark-crypto allows Signature Malleability","id":"CVE-2023-44273","kev_date_added":null,"published":"2023-09-28"},{"cvss_score":5.9,"headline":"gnark's commitments to private witnesses in Groth16 as implemented break zero-knowledge property","id":"CVE-2024-45040","kev_date_added":null,"published":"2024-09-06"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"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-09-06","vendors":["Consensys"]},"summary":"A soundness flaw in gnark allows provers to manipulate commitments in circuits using multiple commitments, potentially bypassing verification checks.","url":"https://insights.sbomify.com/CVE-2024-45039/"}