GHSA-f77q-r5qm-w4m8: Sp1 recursion gnark ffi Sp1-recursion-gnark-ffi Has Insufficient Range Checks Vulnerability
MODERATEGHSA-f77q-r5qm-w4m8 is a MODERATE (CVSS 5.3) sp1-recursion-gnark-ffi has insufficient range checks vulnerability (General Security Weakness) affecting Sp1 recursion gnark ffi libraries in the crates.io ecosystem. The issue involves sp1-recursion-gnark-ffi has insufficient range checks of babybear arithmetic. Remediation is available by upgrading affected packages to version 1.2.0.
GHSA-f77q-r5qm-w4m8 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix GHSA-f77q-r5qm-w4m8
To remediate this vulnerability, upgrade all affected Sp1 recursion gnark ffi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade sp1-recursion-gnark-ffi to 1.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for sp1-recursion-gnark-ffi
How to Check if You Are Affected
To determine whether your application is affected by GHSA-f77q-r5qm-w4m8, inspect your project dependencies for Sp1 recursion gnark ffi:
inspect dependencies for sp1-recursion-gnark-ffi
Analyze the terminal output to locate any version of Sp1 recursion gnark ffi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Sp1 recursion gnark ffi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-f77q-r5qm-w4m8 Affected Sp1 recursion gnark ffi Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sp1-recursion-gnark-ffi
|
crates.io |
< 1.2.0
|
1.2.0
|
References
Frequently Asked Questions
What is GHSA-f77q-r5qm-w4m8?
Which Sp1 recursion gnark ffi versions are affected?
What version fixes GHSA-f77q-r5qm-w4m8?
Is sp1-recursion-gnark-ffi affected?
What is the CVSS score of GHSA-f77q-r5qm-w4m8?
What CWE is associated with GHSA-f77q-r5qm-w4m8?
How can I check crates.io dependencies for GHSA-f77q-r5qm-w4m8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f77q-r5qm-w4m8",
"modified" : "2024-10-29T15:37:50Z",
"published" : "2024-10-29T15:37:50Z",
"aliases" : [ ],
"summary" : "sp1-recursion-gnark-ffi has insufficient range checks of BabyBear arithmetic ",
"details" : "The Gnark recursion circuit constrains arithmetic over BabyBear when the native field of the ZKP circuit is the BN254 scalar field. Proper implementation of this logic requires range checking Bn254 values to be less than the BabyBear modulus.\n\nIn versions < 1.2.0, functions like `InvF` and `InvE` used values generated by hints that were not appropriately range checked. These issues are resolved in versions 1.2.0 and higher, by adding range checks in the appropriate places. This code was covered under the original audit scope of the recursion circuit audit by Veridise, and both Veridise and Kalos revisited the code for similar issues and found no additional vulnerabilities.\n\nThis issue was discovered by the Succinct team on September 3rd. The issue was fixed and resolved within 48 hours, and released with V1.2.0 (note that a later V2.0.0 release has the same contents as V1.2.0 to respect semver), with production SP1 users being notified and upgraded immediately. The V1.1.0 verifier was frozen on September 4th to ensure that no one uses versions of SP1 with this bug.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "sp1-recursion-gnark-ffi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/succinctlabs/sp1/security/advisories/GHSA-f77q-r5qm-w4m8"
}, {
"type" : "WEB",
"url" : "https://github.com/succinctlabs/sp1/commit/8600d4aa63184ce3df7ccd30c79ac0388eacca52"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/succinctlabs/sp1"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-29T15:37:50Z",
"nvd_published_at" : null
}
}