CVE-2025-61588: Risc0 zkvm platform Risc0 Vulnerable To Arbitrary Code Vulnerability

CRITICAL
Advisory Identifier: GHSA-jqq4-c7wq-36h7
CWE-94
Published
Advisory Summary

CVE-2025-61588 is a CRITICAL risc0 vulnerable to arbitrary code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Risc0 zkvm platform libraries in the crates.io ecosystem. The issue involves risc0 vulnerable to arbitrary code execution in guest via memory safety failure in `sys_read`. Remediation is available by upgrading affected packages to version 2.1.0, 0.9, 2.3.2, 3.0.3.

CVE-2025-61588 at a Glance

CVE Identifier CVE-2025-61588
GHSA Identifier GHSA-jqq4-c7wq-36h7
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Risc0 zkvm platform
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2025-61588

To remediate this vulnerability, upgrade all affected Risc0 zkvm platform dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

risc0-zkvm-platform fixed: 2.1.0
Upgrade risc0-zkvm-platform to 2.1.0
risc0-zkos-v1compat fixed: 2.1.0
Upgrade risc0-zkos-v1compat to 2.1.0
risc0-aggregation fixed: 0.9
Upgrade risc0-aggregation to 0.9
risc0-zkvm fixed: 2.3.2
Upgrade risc0-zkvm to 2.3.2
risc0-zkvm fixed: 3.0.3
Upgrade risc0-zkvm to 3.0.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for risc0-zkvm-platform

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-61588, inspect your project dependencies for Risc0 zkvm platform:

inspect dependencies for risc0-zkvm-platform

Analyze the terminal output to locate any version of Risc0 zkvm platform in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.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 CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Risc0 zkvm platform, 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

# Arbitrary code execution in guest via memory safety failure in `sys_read` In affected versions of `risc0-zkvm-platform`, when the zkVM guest calls `sys_read`, the host is able to use a crafted response to write to an arbitrary memory location in the guest. This capability can be leveraged to execute arbitrary code within the guest. As `sys_read` is the mechanism by which input is requested by the guest, all guest programs built with the affected versions are vulnerable. This critically compromises the soundness guarantees of the guest program. A fix was applied in [\#3351](https://github.com/risc0/risc0/pull/3351). The vulnerable pointer arithmetic was removed, and replaced with a simplified implementation in the `v1compat` kernel which uses Rust’s slice functions to guarantee memory safety. The fix has been released as part of `risc0-zkvm` versions `2.3.2` and `3.0.3`. All prior versions are affected. ## Remediation All developers of zkVM applications should update their guests to use `risc0-zkvm` versions `^2.3.2` or `^3.0.3`. This upgrade can be accomplished by editing all `Cargo.toml` files in the following way. * Any references to [`risc0-zkvm`](https://crates.io/crates/risc0-zkvm) should use version specifiers `”2.3.2”` or `”3.0.3”`. * Any references to [`risc0-build`](https://crates.io/crates/risc0-build) should use version specifiers `”2.3.2”` or `”3.0.3”`, matching `risc0-zkvm`. * Any references to [`risc0-zkvm-platform`](https://crates.io/crates/risc0-zkvm-platform) should use version specifier `”2.1.0”` or later. Most projects will not have direct references to this crate. Rebuild your application including the guest. You can run the following command to check that the patch is applied: ```shell # Provide the path to your guest Cargo.toml. Should report risc0-zkvm-platform >=v2.1.0 cargo tree --depth 0 -p risc0-zkvm-platform --manifest-path path/to/methods/guest/Cargo.toml ``` Any applications that use the image ID of this guest need to be updated with the newly built image ID. Note that there are no changes to the RISC Zero proof system or circuits. Provers are not required to take any action. Users of the Groth16 smart contract verifier and the [RISC Zero Verifier Router](https://dev.risczero.com/api/blockchain-integration/contracts/verifier#verifier-router) are not required to take any action beyond updating their guest programs. Any applications using the `risc0-aggregation` crate or the `RiscZeroSetVerifier` smart contract should update to version `>=0.9`. This application includes a zkVM guest, which is vulnerable in versions prior to `0.9`. Instances of the `RiscZeroSetVerifier` operated by RISC Zero have been disabled via the estop mechanism outlined in the [Verifier Management Design](https://github.com/risc0/risc0-ethereum/blob/release-2.0/contracts/version-management-design.md#base-verifier-implementations).

CVE-2025-61588 Affected Risc0 zkvm platform Versions

5 component(s)
Fixed Versions:
2.1.00.92.3.23.0.3
Product / Package Ecosystem Affected Versions Fixed Version
risc0-zkvm-platform
crates.io
< 2.1.0
2.1.0
risc0-zkos-v1compat
crates.io
< 2.1.0
2.1.0
risc0-aggregation
crates.io
< 0.9
0.9
risc0-zkvm
crates.io
< 2.3.2
2.3.2
risc0-zkvm
crates.io
≥ 3.0.0
< 3.0.3
3.0.3

References

Frequently Asked Questions

What is CVE-2025-61588?
CVE-2025-61588 is a security vulnerability in Risc0 zkvm platform involving risc0 vulnerable to arbitrary code execution in guest via memory safety failure in `sys_read` under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Risc0 zkvm platform versions are affected?
Affected versions include releases prior to 2.1.0, 0.9, 2.3.2, 3.0.3 across affected packages: risc0-zkvm-platform, risc0-zkos-v1compat, risc0-aggregation, risc0-zkvm.
What version fixes CVE-2025-61588?
Upgrading to 2.1.0, 0.9, 2.3.2, 3.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is risc0-zkvm-platform affected?
Yes, risc0-zkvm-platform is affected in releases prior to 2.1.0. Upgrade your dependency to 2.1.0 or later.
Is risc0-zkos-v1compat affected?
Yes, risc0-zkos-v1compat is affected in releases prior to 2.1.0. Upgrade your dependency to 2.1.0 or later.
What CWE is associated with CVE-2025-61588?
CVE-2025-61588 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check crates.io dependencies for CVE-2025-61588?
Run the dependency tree command: 'inspect dependencies for risc0-zkvm-platform'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jqq4-c7wq-36h7",
  "modified" : "2025-10-02T15:11:40Z",
  "published" : "2025-10-01T21:04:59Z",
  "aliases" : [ "CVE-2025-61588" ],
  "summary" : "risc0 vulnerable to arbitrary code execution in guest via memory safety failure in `sys_read`",
  "details" : "# Arbitrary code execution in guest via memory safety failure in `sys_read`\n\nIn affected versions of `risc0-zkvm-platform`, when the zkVM guest calls `sys_read`, the host is able to use a crafted response to write to an arbitrary memory location in the guest. This capability can be leveraged to execute arbitrary code within the guest. As `sys_read` is the mechanism by which input is requested by the guest, all guest programs built with the affected versions are vulnerable. This critically compromises the soundness guarantees of the guest program.\n\nA fix was applied in [\\#3351](https://github.com/risc0/risc0/pull/3351). The vulnerable pointer arithmetic was removed, and replaced with a simplified implementation in the `v1compat` kernel which uses Rust’s slice functions to guarantee memory safety.\n\nThe fix has been released as part of `risc0-zkvm` versions `2.3.2` and `3.0.3`. All prior versions are affected.\n\n## Remediation\n\nAll developers of zkVM applications should update their guests to use `risc0-zkvm` versions `^2.3.2` or `^3.0.3`.\n\nThis upgrade can be accomplished by editing all `Cargo.toml` files in the following way.\n\n* Any references to [`risc0-zkvm`](https://crates.io/crates/risc0-zkvm) should use version specifiers `”2.3.2”` or `”3.0.3”`.  \n* Any references to [`risc0-build`](https://crates.io/crates/risc0-build) should use version specifiers `”2.3.2”` or `”3.0.3”`, matching `risc0-zkvm`.  \n* Any references to [`risc0-zkvm-platform`](https://crates.io/crates/risc0-zkvm-platform) should use version specifier `”2.1.0”` or later. Most projects will not have direct references to this crate.\n\nRebuild your application including the guest. You can run the following command to check that the patch is applied:\n\n```shell\n# Provide the path to your guest Cargo.toml. Should report risc0-zkvm-platform >=v2.1.0\ncargo tree --depth 0 -p risc0-zkvm-platform --manifest-path path/to/methods/guest/Cargo.toml\n```\n\nAny applications that use the image ID of this guest need to be updated with the newly built image ID.\n\nNote that there are no changes to the RISC Zero proof system or circuits. Provers are not required to take any action. Users of the Groth16 smart contract verifier and the [RISC Zero Verifier Router](https://dev.risczero.com/api/blockchain-integration/contracts/verifier#verifier-router) are not required to take any action beyond updating their guest programs.\n\nAny applications using the `risc0-aggregation` crate or the `RiscZeroSetVerifier` smart contract should update to version `>=0.9`. This application includes a zkVM guest, which is vulnerable in versions prior to `0.9`. Instances of the `RiscZeroSetVerifier` operated by RISC Zero have been disabled via the estop mechanism outlined in the [Verifier Management Design](https://github.com/risc0/risc0-ethereum/blob/release-2.0/contracts/version-management-design.md#base-verifier-implementations).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "risc0-zkvm-platform"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "risc0-zkos-v1compat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "risc0-aggregation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "risc0-zkvm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "risc0-zkvm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0/security/advisories/GHSA-jqq4-c7wq-36h7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-61588"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0/pull/3351"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0/commit/3f00e1fa0159599c1601e788021f2169d1f0a4dc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/risc0/risc0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-01T21:04:59Z",
    "nvd_published_at" : "2025-10-02T00:15:49Z"
  }
}