GHSA-g3qg-6746-3mg9

Suggest an improvement
Source
https://github.com/advisories/GHSA-g3qg-6746-3mg9
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/06/GHSA-g3qg-6746-3mg9/GHSA-g3qg-6746-3mg9.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-g3qg-6746-3mg9
Aliases
Published
2025-06-20T18:08:04Z
Modified
2025-06-20T22:21:27Z
Severity
  • 2.7 (Low) CVSS_V4 - 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/E:U CVSS Calculator
Summary
zkVM Underconstrained Vulnerability
Details

Due to a missing constraint in the rv32im circuit, any 3-register RISC-V instruction (including remu and divu) in risc0-zkvm 2.0.0, 2.0.1, and 2.0.2 are vulnerable to an attack by a malicious prover. The main idea for the attack is to confuse the RISC-V virtual machine into treating the value of the rs1 register as the same as the rs2 register due to a lack of constraints in the rv32im circuit.

This vulnerability was reported by Christoph Hochrainer via our Hackenproof bug bounty.

The fix for the circuit was implemented in zirgen/pull/238, and the update to risc0 was implemented in risc0/pull/3181. Impacted on-chain verifiers have already been disabled via the estop mechanism outlined in the Verifier Management Design.

Mitigation

It is recommend all impacted users upgrade as soon as possible.

Rust applications using the risc0-zkvm crate at versions 2.0.0, 2.0.1, and 2.0.2 should upgrade to version 2.1.0.

Smart contract applications using the official RISC Zero Verifier Router do not need to take any action: zkVM version 2.1 is active on all official routers, and version 2.0 has been disabled.

Smart contract applications not using the verifier router should update their contracts to send verification calls to the 2.1 version of the verifier.

Database specific
{
    "nvd_published_at": "2025-06-20T18:15:28Z",
    "cwe_ids": [
        "CWE-345"
    ],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2025-06-20T18:08:04Z"
}
References

Affected packages

crates.io / risc0-zkvm

Package

Affected ranges

Type
SEMVER
Events
Introduced
2.0.0
Fixed
2.1.0

Database specific

{
    "last_known_affected_version_range": "<= 2.0.2"
}

crates.io / risc0-circuit-rv32im

Package

Name
risc0-circuit-rv32im
View open source insights on deps.dev
Purl
pkg:cargo/risc0-circuit-rv32im

Affected ranges

Type
SEMVER
Events
Introduced
2.0.0
Fixed
2.0.4

Database specific

{
    "last_known_affected_version_range": "<= 2.0.3"
}