CVE-2023-44378: consensys gnark Integer Underflow (Wrap or Wraparound)
Vulnerability summary
CVE-2023-44378 is a high (CVSS 7.1) Integer Underflow (Wrap or Wraparound) vulnerability in consensys gnark. EPSS estimates a 0.23% chance of exploitation in the next 30 days, higher than 13.4% of scored vulnerabilities.
Timeline
- 09-10-2023PublishedVulnerability first disclosed.
- 19-09-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · GoEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NDiffers
- NVDNIST5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NDiffers
EPSS trend
Probability
0.23%
Chance of exploitation in the next 30 days
Percentile
13%
Versus all other CVEs
30-day change
+0.01 pp
From 0.22% on 21-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-191Integer Underflow (Wrap or Wraparound)The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
- CWE-697Incorrect ComparisonThe product compares two entities in a security-relevant context, but the comparison is incorrect.
Affected systems
Consensys1 product
- gnark< 0.9.0
Github.com/consensys1 product
- gnark< 0.9.0
2 vendors · 2 products
References
7 links- github.com/Consensys/gnark/security/advisories/GHSA-498w-5j49-vqjgX Refsource CONFIRMWEBMitigationPatchThird Party Advisory
- github.com/Consensys/gnark/commit/59a4087261a6c73f13e80d695c17b398c3d0934fX Refsource MISCWEBFIXPatch
- github.com/Consensys/gnarkPACKAGE