{"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-45040 exists.","fix":"Upgrade github.com/consensys/gnark to 0.11.0 or later.","what":"CVE-2024-45040 is a medium-severity vulnerability in Consensys gnark, published on 6 Sep 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-45040 and fix it if it is affected.\n\nWhat it is: CVE-2024-45040 is a medium-severity vulnerability in Consensys gnark, published on 6 Sep 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-45040 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-45040/ (Markdown: https://insights.sbomify.com/CVE-2024-45040/index.md)","id":"CVE-2024-45040","markdown":"https://insights.sbomify.com/CVE-2024-45040/index.md","name":"CVE-2024-45040","record":{"aliases":["GHSA-9xcg-3q8v-7fq6","GO-2024-3123"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Go zk-SNARK library","requires_auth":"none","summary":"Attackers can deduce private witness values in Groth16 proofs if values are small, compromising zero-knowledge privacy in gnark library.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"gnark-crypto","vendor":"consensys"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/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. Prior to version 0.11.0, commitments to private witnesses in Groth16 as implemented break the zero-knowledge property. The vulnerability affects only Groth16 proofs with commitments. Notably, PLONK proofs are not affected. The vulnerability affects the zero-knowledge property of the proofs - in case the witness (secret or internal) values are small, then the attacker may be able to enumerate all possible choices to deduce the actual value. If the possible choices for the variables to be committed is large or there are many values committed, then it would be computationally infeasible to enumerate all valid choices. It doesn't affect the completeness/soundness of the proofs. The vulnerability has been fixed in version 0.11.0. The patch to fix the issue is to add additional randomized value to the list of committed value at proving time to mask the rest of the values which were committed. As a workaround, the user can manually commit to a randomized value.","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 commitments to private witnesses in Groth16 as implemented break zero-knowledge property","id":"CVE-2024-45040","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"information_disclosure","year":"2024"},"n_packages":3,"n_references":3,"next":{"headline":"External Secrets Operator vulnerable to privilege escalation","id":"CVE-2024-45041"},"packages":[{"ecosystem":"Go","fixed":["0.11.0"],"introduced":["0"],"last_affected":[],"package":"github.com/consensys/gnark","purl":null,"source":"GHSA-9xcg-3q8v-7fq6"},{"ecosystem":"Go","fixed":["0.11.0"],"introduced":["0"],"last_affected":[],"package":"github.com/consensys/gnark","purl":"pkg:golang/github.com/consensys/gnark","source":"GHSA-9xcg-3q8v-7fq6"},{"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-3123"}],"prev":{"headline":"gnark's Groth16 commitment extension unsound for more than one commitment","id":"CVE-2024-45039"},"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":6.2,"headline":"gnark's Groth16 commitment extension unsound for more than one commitment","id":"CVE-2024-45039","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":"Attackers can deduce private witness values in Groth16 proofs if values are small, compromising zero-knowledge privacy in gnark library.","url":"https://insights.sbomify.com/CVE-2024-45040/"}