Skip to content
Heist/ feed
Back to feed
Medium

Out-of-memory during deserialization with crafted inputs

Type: advisorySources: OSV

gnark is a fast zk-SNARK library that offers a high-level API to design circuits. In gnark 0.11.0 and earlier, deserialization of Groth16 verification keys allocate excessive memory, consuming a lot of resources and triggering a crash with the error fatal error: runtime: out of memory.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-50354
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 01:18 UTC · Revision 1

Source evidence

Out-of-memory during deserialization with crafted inputs

core-osv · Original source

Published 31 Oct 2024, 15:59 UTC

gnark is a fast zk-SNARK library that offers a high-level API to design circuits. In gnark 0.11.0 and earlier, deserialization of Groth16 verification keys allocate excessive memory, consuming a lot of resources and triggering a crash with the error fatal error: runtime: out of memory.

osv:CVE-2024-50354
Complete source record
{
  "id": "6500b2a8f603b258cb2ae9a352d20d6e04df3a4eb3ca0c15eaf0567964645348",
  "url": "https://osv.dev/vulnerability/CVE-2024-50354",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Out-of-memory during deserialization with crafted inputs",
    "summary": "gnark is a fast zk-SNARK library that offers a high-level API to design circuits. In gnark 0.11.0 and earlier, deserialization of Groth16 verification keys allocate excessive memory, consuming a lot of resources and triggering a crash with the error fatal error: runtime: out of memory.",
    "evidence": "osv:CVE-2024-50354",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-50354",
      "aliases": [
        "CVE-2024-50354",
        "GHSA-cph5-3pgr-c82g",
        "GO-2024-3244"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/Consensys-Incorporated/gnark",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "47ae846339add2bdf9983e499342bfdfe195191d"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "0.11.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "47ae846339add2bdf9983e499342bfdfe195191d"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.11.0",
            "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"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50354.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.572463882Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50354.json",
        "https://github.com/Consensys/gnark/security/advisories/GHSA-cph5-3pgr-c82g",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-50354",
        "https://github.com/Consensys/gnark/commit/47ae846339add2bdf9983e499342bfdfe195191d",
        "https://github.com/Consensys/gnark/pull/1307"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-400"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50354.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-50354",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 508971,
  "published_at": "2024-10-31T15:59:30.063+00:00"
}