{"id":"CVE-2025-61588","aliases":["CVE-2025-61588","GHSA-jqq4-c7wq-36h7"],"related":[],"kind":"vulnerability","state":"published","title":"risc0 vulnerable to arbitrary code execution in guest via memory safety failure in `sys_read`","summary":"RISC Zero is a zero-knowledge verifiable general computing platform based on zk-STARKs and the RISC-V microarchitecture. In versions 2.0.2 and below 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. Other affected packages include risc0-aggregation versions below 0.9,  risc0-zkos-v1compat below 2.1.0, risc0-zkvm versions between 3.0.0-rc.1 and 3.0.1. This issue has been fixed in the following versions: risc0-zkvm-platform 2.1.0, risc0-zkos-v1compat 2.1.0, risc0-aggregation 0.9, and risc0-zkvm 2.3.2 and 3.0.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"RISC Zero is a zero-knowledge verifiable general computing platform based on zk-STARKs and the RISC-V microarchitecture. In versions 2.0.2 and below 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. Other affected packages include risc0-aggregation versions below 0.9,  risc0-zkos-v1compat below 2.1.0, risc0-zkvm versions between 3.0.0-rc.1 and 3.0.1. This issue has been fixed in the following versions: risc0-zkvm-platform 2.1.0, risc0-zkos-v1compat 2.1.0, risc0-aggregation 0.9, and risc0-zkvm 2.3.2 and 3.0.3.","source":"cvelist"},{"lang":"en","text":"# 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).","format":"markdown","source":"ghsa"},{"lang":"es","text":"RISC Zero es una plataforma de computación general verificable de conocimiento cero basada en zk-STARKs y la microarquitectura RISC-V. En las versiones 2.0.2 e inferiores de risc0-zkvm-platform, cuando el invitado zkVM llama a sys_read, el anfitrión puede usar una respuesta manipulada para escribir en una ubicación de memoria arbitraria en el invitado. Esta capacidad puede ser aprovechada para ejecutar código arbitrario dentro del invitado. Dado que sys_read es el mecanismo por el cual el invitado solicita la entrada, todos los programas de invitado construidos con las versiones afectadas son vulnerables. Esto compromete críticamente las garantías de solidez del programa de invitado. Otros paquetes afectados incluyen risc0-aggregation versiones inferiores a 0.9, risc0-zkos-v1compat inferiores a 2.1.0, risc0-zkvm versiones entre 3.0.0-rc.1 y 3.0.1. Este problema ha sido solucionado en las siguientes versiones: risc0-zkvm-platform 2.1.0, risc0-zkos-v1compat 2.1.0, risc0-aggregation 0.9, y risc0-zkvm 2.3.2 y 3.0.3.","source":"nvd"}],"published":"2025-10-01T21:04:59.000Z","modified":"2026-10-19T17:10:00.173Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"< 2.1.0","status":"affected"}],"vendor":"risc0","product":"risc0","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.0"}],"ecosystem":"crates.io","package":"risc0-zkvm-platform","purl":"pkg:cargo/risc0-zkvm-platform","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.0"}],"ecosystem":"crates.io","package":"risc0-zkos-v1compat","purl":"pkg:cargo/risc0-zkos-v1compat","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.9"}],"ecosystem":"crates.io","package":"risc0-aggregation","purl":"pkg:cargo/risc0-aggregation","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.3.2"}],"ecosystem":"crates.io","package":"risc0-zkvm","purl":"pkg:cargo/risc0-zkvm","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.3"}],"ecosystem":"crates.io","package":"risc0-zkvm","purl":"pkg:cargo/risc0-zkvm","source":"ghsa"}],"references":[{"url":"https://github.com/risc0/risc0/security/advisories/GHSA-jqq4-c7wq-36h7","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/risc0/risc0/pull/3351","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/risc0/risc0/commit/3f00e1fa0159599c1601e788021f2169d1f0a4dc","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61588","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/risc0/risc0","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2025-10-02T18:00:36.554Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-61588","url":"https://www.cve.org/CVERecord?id=CVE-2025-61588","licence":"CVE Terms of Use","modified":"2025-10-02T18:01:05.528Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jqq4-c7wq-36h7","url":"https://github.com/advisories/GHSA-jqq4-c7wq-36h7","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:29.875Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-61588","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61588","licence":"Public domain","modified":"2026-10-19T17:10:00.173Z"}],"updatedAt":"2026-11-25T22:59:05.420Z","epss":{"score":0.00482,"percentile":0.4316,"date":"2026-12-01T12:00:22.000Z"}}