# CVE-2024-45040: gnark's commitments to private witnesses in Groth16 as implemented break zero-knowledge property

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.43%, higher than 38% of CVEs (2026-12-01)
- Published: 2024-09-06T12:53:30.622Z
- Modified: 2026-06-17T07:53:28.623Z
- Also known as: GHSA-9xcg-3q8v-7fq6, GO-2024-3123
- Weaknesses: CWE-200
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Consensys gnark: < 0.11.0; up to 0.11.0
- github.com/consensys/gnark (Go): before 0.11.0
- consensys gnark-crypto: before 0.11.0

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.9 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/Consensys/gnark/security/advisories/GHSA-9xcg-3q8v-7fq6> (advisory, third-party-advisory, web)
- <https://github.com/Consensys/gnark/pull/1245> (fix, product, web)
- <https://github.com/Consensys/gnark/commit/afda68a38acca37becb8ba6d8982d03fee9559a0> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-45040> (advisory)
- <https://github.com/Consensys/gnark> (package)
- <https://pkg.go.dev/vuln/GO-2024-3123> (web)

## Sources

- CVE List: [CVE-2024-45040](https://www.cve.org/CVERecord?id=CVE-2024-45040), CVE Terms of Use, modified 2024-09-06
- GitHub Advisory Database: [GHSA-9xcg-3q8v-7fq6](https://github.com/advisories/GHSA-9xcg-3q8v-7fq6), CC-BY-4.0, modified 2024-11-18
- Go Vulnerability Database: [GO-2024-3123](https://pkg.go.dev/vuln/GO-2024-3123), CC-BY-4.0, modified 2024-09-13
- NVD: [CVE-2024-45040](https://nvd.nist.gov/vuln/detail/CVE-2024-45040), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-45040 · Whole record: https://cve.day/CVE-2024-45040.json · Rebuilt by cve.day 2026-11-25T22:58:45.134Z
