gnark's commitments to private witnesses in Groth16 as implemented break zero-knowledge property
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-200.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Consensys | gnark | before 0.11.0 | 0.11.0 | Patch available | CNA |
| — | github.com/consensys/gnark (Go) | before 0.11.0 | 0.11.0 | Patch available | GHSA-9xcg-3q8v-7fq6 |
| — | github.com/consensys/gnark (Go) | before 0.11.0 | 0.11.0 | Patch available | GHSA-9xcg-3q8v-7fq6 |
- gnark VendorConsensys Affected before 0.11.0 Fixed in 0.11.0 Patch available CNA
- github.com/consensys/gnark (Go) Vendor— Affected before 0.11.0 Fixed in 0.11.0 Patch available GHSA-9xcg-3q8v-7fq6
- github.com/consensys/gnark (Go) Vendor— Affected before 0.11.0 Fixed in 0.11.0 Patch available GHSA-9xcg-3q8v-7fq6
Remediation
- Fix · CNA gnark (Consensys) Fixed in 0.11.0
- Fix · GHSA-9xcg-3q8v-7fq6 github.com/consensys/gnark (Go) Fixed in 0.11.0 Advisory →
- Fix · GHSA-9xcg-3q8v-7fq6 github.com/consensys/gnark (Go) Fixed in 0.11.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-45040
- 2026-10-03 Alias added: GHSA-9xcg-3q8v-7fq6
References
Advisory 2
More Consensys Gnark-crypto vulnerabilities
- TI-2024-30151 gnark's Groth16 commitment extension unsound for more than one commitment CVSS 3.1MEDIUM 6.2
- TI-2023-23797 Consensys gnark-crypto through 0.11.2 allows Signature Malleability. CVSS 3.1CRITICAL 9.8
Sources
- CVE-2024-45040 · CVE Program
- CVE-2024-45040 · NVD
- FIRST EPSS
- GHSA-9xcg-3q8v-7fq6 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences