gnark-crypto allows unchecked memory allocation during vector deserialization
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/consensys/gnark-crypto 0.19.2, 0.18.1), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
Go github.com/consensys/gnark-crypto
- Affected
- >= 0.9.1, < 0.18.1>= 0.19.0, <= 0.19.0
- Fixed in
- 0.19.2, 0.18.1
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-fj2x-735w-74vq lists affected ranges: Go github.com/consensys/gnark-crypto >=0.9.1 =0.19.0 <=0.19.0
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
The issue has been reported by @raefko from @fuzzinglabs. Excerpts from the report: A critical vulnerability exists in the gnark-crypto library's Vector.ReadFrom() function that allows an attacker to trigger arbitrary memory allocation by crafting malicious input data. An attacker can cause the verifier to attempt allocating up to 128 GB of memory with a minimal malicious input, leading to out-of-memory crashes and denial of service.
Root Cause The vulnerability stems from unchecked deserialization of attacker-controlled length fields in the gnark-crypto library's Vector.ReadFrom() function. The function reads a 4-byte unsigned integer from untrusted input and directly uses it to allocate memory without any validation or bounds checking.
Vulnerable Code Path
Vulnerable Code File: gnark-crypto@v0.14.0+/ecc/bn254/fr/vector.go:136-144 The code reads a 4-byte big-endian unsigned integer (sliceLen) directly from the input stream and uses it to allocate a slice without any…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-fj2x-735w-74vq
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: GHSA-fj2x-735w-74vq Advisory: gnark-crypto allows unchecked memory allocation during vector deserialization IDs: GHSA-fj2x-735w-74vq Record: https://patchnext.com/advisories/ghsa-fj2x-735w-74vq (revision 1, source checked 26 Oct 2026, 15:13 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 7.5) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: github.com/consensys/gnark-crypto 0.19.2, 0.18.1. A vendor fix does not mean a deployment is fixed. ## Affected components - Go github.com/consensys/gnark-crypto: affected >= 0.9.1, < 0.18.1; >= 0.19.0, <= 0.19.0; fixed in 0.19.2, 0.18.1 ## Suggested inspection (read-only) - Go github.com/consensys/gnark-crypto: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on github.com/consensys/gnark-crypto. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-fj2x-735w-74vq (GitHub-reviewed advisory GHSA-fj2x-735w-74vq lists affected ranges: Go github.com/consensys/gnark-crypto >=0.9.1 =0.19.0 <=0.19.0) Commands are suggestions: review each one before running it.
Loading voting…