Skip to content
Heist/ feed
Back to feed
Medium

gnark's Groth16 commitment extension unsound for more than one commitment

Type: advisorySources: OSV

gnark is a fast zk-SNARK library that offers a high-level API to design circuits. Versions prior to 0.11.0 have a soundness issue - in case of multiple commitments used inside the circuit the prover is able to choose all but the last commitment. As gnark uses the commitments for optimized non-native multiplication, lookup checks etc. as random challenges, then it could impact the soundness of the whole circuit. However, using multiple commitments has been discouraged due to the additional cost to the verifier and it has not been supported in the recursive in-circuit Groth16 verifier and Solidity verifier. gnark's maintainers expect the impact of the issue be very small - only for the users who have implemented the native Groth16 verifier or are using it with multiple commitments. We do not have information of such users. The issue has been patched in version 0.11.0. As a workaround, users should follow gnark maintainers' recommendation to use only a single commitment and then derive in-circuit commitments as needed using the `std/multicommit` package.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-45039
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 17:31 UTC · Revision 1

Source evidence

gnark's Groth16 commitment extension unsound for more than one commitment

core-osv · Original source

Published 6 Sept 2024, 12:56 UTC

gnark is a fast zk-SNARK library that offers a high-level API to design circuits. Versions prior to 0.11.0 have a soundness issue - in case of multiple commitments used inside the circuit the prover is able to choose all but the last commitment. As gnark uses the commitments for optimized non-native multiplication, lookup checks etc. as random challenges, then it could impact the soundness of the whole circuit. However, using multiple commitments has been discouraged due to the additional cost to the verifier and it has not been supported in the recursive in-circuit Groth16 verifier and Solidity verifier. gnark's maintainers expect the impact of the issue be very small - only for the users who have implemented the native Groth16 verifier or are using it with multiple commitments. We do not have information of such users. The issue has been patched in version 0.11.0. As a workaround, users should follow gnark maintainers' recommendation to use only a single commitment and then derive in-circuit commitments as needed using the `std/multicommit` package.

osv:CVE-2024-45039
Complete source record
{
  "id": "6d788c987f244b934a9b6673339d3c8c323339deb2faf658254f3fcf015c415d",
  "url": "https://osv.dev/vulnerability/CVE-2024-45039",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "gnark's Groth16 commitment extension unsound for more than one commitment",
    "summary": "gnark is a fast zk-SNARK library that offers a high-level API to design circuits. Versions prior to 0.11.0 have a soundness issue - in case of multiple commitments used inside the circuit the prover is able to choose all but the last commitment. As gnark uses the commitments for optimized non-native multiplication, lookup checks etc. as random challenges, then it could impact the soundness of the whole circuit. However, using multiple commitments has been discouraged due to the additional cost to the verifier and it has not been supported in the recursive in-circuit Groth16 verifier and Solidity verifier. gnark's maintainers expect the impact of the issue be very small - only for the users who have implemented the native Groth16 verifier or are using it with multiple commitments. We do not have information of such users. The issue has been patched in version 0.11.0. As a workaround, users should follow gnark maintainers' recommendation to use only a single commitment and then derive in-circuit commitments as needed using the `std/multicommit` package.",
    "evidence": "osv:CVE-2024-45039",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-45039",
      "aliases": [
        "CVE-2024-45039",
        "GHSA-q3hw-3gm4-w5cr",
        "GO-2024-3122"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/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"
                  }
                ]
              }
            },
            {
              "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-45039.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:21.395118831Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/45xxx/CVE-2024-45039.json",
        "https://github.com/Consensys/gnark/security/advisories/GHSA-q3hw-3gm4-w5cr",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-45039",
        "https://github.com/Consensys/gnark/commit/e7c66b000454f4d2a4ae48c005c34154d4cfc2a2"
      ],
      "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-45039.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-45039",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487778,
  "published_at": "2024-09-06T12:56:15.08+00:00"
}