Every CVESearch/Get API key

GHSA-rjjm-x32p-m3f7

gnark's range checker gadget allows wider inputs up to word alignment

3.2 LowFix available

GHSA-rjjm-x32p-m3f7 is a low vulnerability (CVSS 3.2) in github.com/consensys/gnark, published November 12, 2023. No source lists public exploit code. Fixed in github.com/consensys/gnark 0.9.2.

What does this mean?
Severity
3.2 LowCVSS 3.1, GitHub Advisories
Exploit chance
UnscoredNo EPSS score yet
Exploitation
None knownNot on CISA’s or ENISA’s lists

Description

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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
None

Affected packages

Affected packages
PackageAffectedFixed
github.com/consensys/gnark
Go
before 0.9.2
0.9.2
github.com/consensys/gnark
Go
before 0.9.2-0.20231110170422-f528807119e9
0.9.2-0.20231110170422-f528807119e9

What each source reports

GitHub Advisories Score used3.2

gnark's range checker gadget allows wider inputs up to word alignment

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.

Record
GHSA-rjjm-x32p-m3f7
CVSS 3.1
3.2 LowCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
Updated
2026-11-02
OSV3.2

gnark's range checker gadget allows wider inputs up to word alignment

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.

Record
GHSA-rjjm-x32p-m3f7
CVSS 3.1
3.2 LowCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
Updated
2026-11-02
OSVGO-2023-2333No score

Range checker gadget allows wider inputs than allowed in github.com/consensys/gnark

Range checker gadget allows wider inputs than allowed in github.com/consensys/gnark

Record
GO-2023-2333
Updated
2026-11-02

History

History
RecordedChangedSources
first indexedGitHub Advisories, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

References

MoveEnter Open