gnark's commitments to private witnesses in Groth16 as implemented break zero-knowledge property
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-45040
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 19:42 UTC · Revision 1
Source evidence
gnark's commitments to private witnesses in Groth16 as implemented break zero-knowledge property
core-osv · Original sourcePublished 6 Sept 2024, 12:53 UTC
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.
osv:CVE-2024-45040
Complete source record
{
"id": "ba05fddcc474e56521a7369039b57f1bbc1426711d15d402dfceba7e47197c49",
"url": "https://osv.dev/vulnerability/CVE-2024-45040",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "gnark's commitments to private witnesses in Groth16 as implemented break zero-knowledge property",
"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.",
"evidence": "osv:CVE-2024-45040",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2024-45040",
"aliases": [
"CVE-2024-45040",
"GHSA-9xcg-3q8v-7fq6",
"GO-2024-3123"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/Consensys-Incorporated/gnark",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "dc04a1d3b221dbe7571b5a8394b55d02c2872700"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.11.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "afda68a38acca37becb8ba6d8982d03fee9559a0"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
},
{
"repo": "https://github.com/Consensys-Incorporated/gnark-crypto",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "441dc0ffe639294b8d09e394f24ba7575577229c"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:consensys:gnark-crypto:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "0.11.0"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v0.10.0",
"v0.9.1",
"v0.9.0",
"v0.9.0-alpha",
"v0.8.1",
"v0.8.0",
"v0.7.1",
"v0.6.4",
"v0.7.0",
"v0.6.3",
"v0.6.2",
"v0.6.1",
"v0.6.0",
"v0.5.2",
"v0.5.1",
"v0.5.0",
"v0.4.0",
"v0.3.8",
"v0.3.7",
"v0.3.6",
"v0.3.5",
"v0.3.4",
"v0.3.3",
"v0.3.0",
"v0.3.0-alpha",
"v0.2.0-alpha",
"v0.1.0-alpha",
"v0.5.3",
"v0.2.0",
"v0.1.1",
"v0.1.0",
"v0.0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-45040.json"
}
}
],
"modified": "2026-10-28T02:30:38.713038286Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/45xxx/CVE-2024-45040.json",
"https://github.com/Consensys/gnark/security/advisories/GHSA-9xcg-3q8v-7fq6",
"https://nvd.nist.gov/vuln/detail/CVE-2024-45040",
"https://github.com/Consensys/gnark/commit/afda68a38acca37becb8ba6d8982d03fee9559a0",
"https://github.com/Consensys/gnark/pull/1245"
],
"provider_metadata": {
"cwe_ids": [
"CWE-200"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/45xxx/CVE-2024-45040.json"
}
},
"related_cves": [
{
"value": "CVE-2024-45040",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 506294,
"published_at": "2024-09-06T12:53:30.622+00:00"
}