CVE-2024-45040: consensys gnark
Vulnerability summary
CVE-2024-45040 is a medium (CVSS 5.9) vulnerability in consensys gnark. EPSS estimates a 0.43% chance of exploitation in the next 30 days, higher than 35.8% of scored vulnerabilities.
Timeline
- 06-09-2024PublishedVulnerability first disclosed.
- 06-09-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · GoEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- NVDNIST5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS trend
Probability
0.43%
Chance of exploitation in the next 30 days
Percentile
36%
Versus all other CVEs
30-day change
0.00 pp
From 0.43% on 21-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Consensys2 products
- gnark< 0.11.0
- gnark-crypto< 0.11.0
Github.com/consensys1 product
- gnark< 0.11.0
2 vendors · 3 products
References
6 links- github.com/Consensys/gnark/security/advisories/GHSA-9xcg-3q8v-7fq6X Refsource CONFIRMWEBAdvisoryThird Party Advisory
- github.com/Consensys/gnark/commit/afda68a38acca37becb8ba6d8982d03fee9559a0X Refsource MISCWEBFIXPatch
- github.com/Consensys/gnarkPACKAGE