GHSA-RJJM-X32P-M3F7

GHSA-RJJM-X32P-M3F7 is a low-severity security vulnerability in github.com/consensys/gnark (go), affecting versions < 0.9.2. It is fixed in 0.9.2.

Summary

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.

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.

GHSA-RJJM-X32P-M3F7 has a CVSS score of 3.2 (Low). The vector is requires local access, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.9.2); upgrading removes the vulnerable code path.

Affected versions

github.com/consensys/gnark (< 0.9.2)

Security releases

github.com/consensys/gnark → 0.9.2 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

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.

Frequently Asked Questions

  1. What is GHSA-RJJM-X32P-M3F7? GHSA-RJJM-X32P-M3F7 is a low-severity security vulnerability in github.com/consensys/gnark (go), affecting versions < 0.9.2. It is fixed in 0.9.2.
  2. How severe is GHSA-RJJM-X32P-M3F7? GHSA-RJJM-X32P-M3F7 has a CVSS score of 3.2 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/consensys/gnark are affected by GHSA-RJJM-X32P-M3F7? github.com/consensys/gnark (go) versions < 0.9.2 is affected.
  4. Is there a fix for GHSA-RJJM-X32P-M3F7? Yes. GHSA-RJJM-X32P-M3F7 is fixed in 0.9.2. Upgrade to this version or later.
  5. Is GHSA-RJJM-X32P-M3F7 exploitable, and should I be worried? Whether GHSA-RJJM-X32P-M3F7 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-RJJM-X32P-M3F7 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-RJJM-X32P-M3F7? Upgrade github.com/consensys/gnark to 0.9.2 or later.

Other vulnerabilities in github.com/consensys/gnark

Stop the waste.
Protect your environment with Kodem.