GHSA-rjjm-x32p-m3f7: gnark's range checker gadget allows wider inputs up to word alignment
Noroxi assessment
Priority: Monitor (action score 12/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Someone with local access to the system can trigger it. No account or password is required. No user action is required. Special conditions such as timing or configuration are required.
- Fixed version: github.com/consensys/gnark (Go) 0.9.2, 0.9.2-0.20231110170422-f528807119e9.
Low priority for now. Upgrade to github.com/consensys/gnark (Go) 0.9.2, 0.9.2-0.20231110170422-f528807119e9 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: OSV
### Impact gnark provides a gadget in the standard library to allow optimized checking of the bitwidth of the inputs. The gadget works by constructing a fixed lookup table containing all valid entries, partitioning the input and checking that all parts are inside the lookup table. The range checker gadget did not take into account that the highest partition may be less than the width limit, allowing the inputs to be up to 16 bits wider than checked. Range checking gadget is extensively used in field emulation. Users using any dependant gadget (ECDSA verification, proof recursion etc.) is impacted. We consider the impact of the vulnerability being low as the number of attacker-modifiable bits is significantly smaller compared to the bit-width of scalar field modulus and it won't be possible to construct inputs which would allow to overflow the scalar field. ### Patches The issue has been patched in the stable branch of gnark. Due to low severity of the issue no emergency release will be issued and we follow the existing release plan. Versions v0.9.2 and higher are patched. ### Workarounds We consider the issue very hard to exploit and do not recommend manual remediation. However, it is possible to perform manual bit decomposition using `std/math/bits` gadget. ### References Initial issue https://github.com/Consensys/gnark/issues/897 ### Acknowledgement The issue was reported by [@ultrainstinct30](https://github.com/ultrainstinct30).
- Published
- Nov 12, 2023
- Updated
- Nov 15, 2023
- EPSS
- —
- CWE
- —
Report tools
Action score
12
Low priority for now.
- CVSS
- 12 / 40 · 3.2 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · —
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| Go | github.com/consensys/gnark | pkg:golang/github.com/consensys/gnark |
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Go | github.com/consensys/gnark | before 0.9.2 | 0.9.2 |
| Go | github.com/consensys/gnark | before 0.9.2-0.20231110170422-f528807119e9 | 0.9.2-0.20231110170422-f528807119e9 |
Same product
Go: all recordsOther highest-scoring records for the same primary product.
- GO-2023-2333Range checker gadget allows wider inputs than allowed in github.com/consensys/gnark0Monitor
- GO-2023-2119Proof forgery due to insufficient randomness in github.com/consensys/gnark0Monitor
- GHSA-7p92-x423-vwj6Plonk verifier KZG multi point verification0Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Go:github.com/consensys/gnark | 0.9.2 | Package registry (OSV) |
| Go:github.com/consensys/gnark | 0.9.2-0.20231110170422-f528807119e9 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- No account or password is required.
- No user action is required.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- none
- Integrity
- low · data or configuration can be modified
- Availability
- none
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Changed
- Confidentiality impact
- None
- Integrity impact
- Low
- Availability impact
- None
Weakness class (CWE)
—
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
osv
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (3 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.