Vulnerability · Published Oct 9, 2023 · Assigned by GitHub_M

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

High 7.1

In plain English

A high-severity security flaw in gnark from Consensys. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.1High
Exploit odds (30 days)0.2%top 85.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Gogithub.com/consensys/gnark0.9.0GO-2023-2098
Gogithub.com/consensys/gnark0.9.0GHSA-498w-5j49-vqjg

Affected products (as reported)

VendorProductVersions
Consensys gnark < 0.9.0

Weakness: CWE-191, CWE-697 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N

References