{"id":"CVE-2024-45040","published":"2024-09-06T12:53:30Z","modified":"2024-09-06T13:57:49Z","title":"gnark's commitments to private witnesses in Groth16 as implemented break zero-knowledge property","vendor":"Consensys","product":"gnark","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00427,"percentile":0.37838,"provenance":"source"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"references":[{"url":"https://github.com/Consensys/gnark/security/advisories/GHSA-9xcg-3q8v-7fq6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/Consensys/gnark/pull/1245","tags":["x_refsource_MISC"]},{"url":"https://github.com/Consensys/gnark/commit/afda68a38acca37becb8ba6d8982d03fee9559a0","tags":["x_refsource_MISC"]}],"priority":{"score":11.7,"factors":[{"name":"EPSS percentile","points":7.57},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"consensys","affectedVersions":[{"vendor":"Consensys","product":"gnark","versions":["< 0.11.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-06T13:57:02.916086Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/consensys/gnark","vulnerableRanges":["<0.11.0"],"patched":["0.11.0"],"from":["GHSA-9xcg-3q8v-7fq6","GO-2024-3123"],"provenance":"source"}],"summary":{"text":"In gnark (Consensys), prior to version 0.11.0, the commitment mechanism for private witnesses in the Groth16 proof system breaks the zero-knowledge property, and PLONK proofs are not affected. An attacker with network access and no authentication or user interaction can, where the committed witness values are small or few in number, enumerate the possible values to deduce the secret, whereas large or numerous committed values make such enumeration computationally infeasible.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:55:48Z"},"euvd":{"id":"EUVD-2024-2765","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-consensys-gnark-cve-2023-44378","parents":[{"from":"CVE-2023-44378","to":"CVE-2024-45040","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["frontend/cs/r1cs/api.go","internal/stats/latest.stats"],"commits":["https://github.com/Consensys/gnark/commit/59a4087261a6c73f13e80d695c17b398c3d0934f","https://github.com/Consensys/gnark/commit/afda68a38acca37becb8ba6d8982d03fee9559a0"],"basis":"rarely changed file"}]}]}}