GHSA-rjjm-x32p-m3f7: gnark's range checker gadget allows wider inputs up to word alignment
3.2
CVSS Score
3.1
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
-
Published
11/12/2023
Updated
11/12/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/consensys/gnark | go | < 0.9.2 | 0.9.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from how rangecheck_commit.go's commit function handled limb decomposition. The original implementation only checked baseLength-bit partitions but didn't account for cases where the total partition bits (nbLimbs*baseLength) exceeded the required bit constraint. The patch added a critical conditional check (lines 96-108 in the diff) that constrains the shifted most significant limb when there's a discrepancy between partition alignment and requested bit length. This matches the vulnerability description of allowing inputs up to 16 bits wider than checked.