CVE-2025-52884: Risc0 ethereum contracts RISC Zero Ethereum Invalid Commitment Vulnerability

LOW
Advisory Identifier: GHSA-gjv3-89hh-9xq2
CWE-159
Published
Advisory Summary

CVE-2025-52884 is a LOW risc zero ethereum invalid commitment vulnerability (CWE-159: Improper Handling of Invalid Use of Special Elements) affecting Risc0 ethereum contracts libraries in the crates.io ecosystem. The issue involves risc zero ethereum invalid commitment with digest value of zero accepted by steel.validatecommitment. Remediation is available by upgrading affected packages to version 2.1.1.

CVE-2025-52884 at a Glance

CVE Identifier CVE-2025-52884
GHSA Identifier GHSA-gjv3-89hh-9xq2
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-159: Improper Handling of Invalid Use of Special Elements
Affected Product Risc0 ethereum contracts
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2025-52884

To remediate this vulnerability, upgrade all affected Risc0 ethereum contracts 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-ethereum-contracts fixed: 2.1.1
Upgrade risc0-ethereum-contracts to 2.1.1
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-ethereum-contracts

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-52884, inspect your project dependencies for Risc0 ethereum contracts:

inspect dependencies for risc0-ethereum-contracts

Analyze the terminal output to locate any version of Risc0 ethereum contracts in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.1), 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-159: Improper Handling of Invalid Use of Special Elements, where the product does not properly filter, remove, quote, or otherwise manage the invalid use of special elements in user-controlled input, which could cause adverse effect on its behavior and integrity. In Risc0 ethereum contracts, 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

### Impact Prior to 2.1.1 and 2.2.0, the `Steel.validateCommitment` Solidity library function will return `true` for a crafted commitment with a digest value of zero. This violates the semantics of `validateCommitment`, as this does not commitment to a block that is in the current chain. Because the digest is zero, it does not correspond to any block and there exist no known openings. As a result, this commitment will never be produced by a correct zkVM guest using Steel. Leveraging this bug to compromise the soundness of an application using Steel would require a separate bug or misuse of the Steel library, which is expected to be used to validate the root of state opening proofs (e.g. having the guest commit to a digest of zero, or failing to check the zkVM proof). Because this bug does not risk application integrity, correctly written applications are not at risk. ### Fix Please see [#605] for a full description of the bug, and the fix. This fix has been released as part of `risc0-ethereum` [2.1.1] and [2.2.0]. ### Recommended actions Users for the `Steel` Solidity library versions 2.1.0 or earlier should ensure they are using `Steel.validateCommitment` in tandem with zkVM proof verification of a Steel program, as shown in the [ERC-20 counter example][example], and [documentation]. This is the correct usage of Steel, and users following this pattern are not at risk, and do not need to take action. Users not verifying a zkVM proof of a Steel program should update their application to do so, as this is incorrect usage of Steel. ### Credit A thank you to Daniel526 on HackenProof for reporting this issue [#605]: https://github.com/risc0/risc0-ethereum/pull/605 [example]: https://github.com/risc0/risc0-ethereum/blob/ff0cb9253a87945b653b825711b8b5075f8b7545/examples/erc20-counter/contracts/src/Counter.sol#L56-L63 [documentation]: https://docs.beboundless.xyz/developers/steel/how-it-works#verifying-the-proof-onchain [2.1.1]: https://github.com/risc0/risc0-ethereum/releases/tag/v2.1.1 [2.2.0]: https://github.com/risc0/risc0-ethereum/releases/tag/v2.2.0

CVE-2025-52884 Affected Risc0 ethereum contracts Versions

1 component(s)
Fixed Versions:
2.1.1
Product / Package Ecosystem Affected Versions Fixed Version
risc0-ethereum-contracts
crates.io
< 2.1.1
2.1.1

References

Frequently Asked Questions

What is CVE-2025-52884?
CVE-2025-52884 is a security vulnerability in Risc0 ethereum contracts involving RISC Zero Ethereum invalid commitment with digest value of zero accepted by Steel.validateCommitment under CWE-159: Improper Handling of Invalid Use of Special Elements.
Which Risc0 ethereum contracts versions are affected?
Affected versions include releases prior to 2.1.1 across affected packages: risc0-ethereum-contracts.
What version fixes CVE-2025-52884?
Upgrading to 2.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is risc0-ethereum-contracts affected?
Yes, risc0-ethereum-contracts is affected in releases prior to 2.1.1. Upgrade your dependency to 2.1.1 or later.
What CWE is associated with CVE-2025-52884?
CVE-2025-52884 is classified under CWE-159: Improper Handling of Invalid Use of Special Elements (The product does not properly filter, remove, quote, or otherwise manage the invalid use of special elements in user-controlled input, which could cause adverse effect on its behavior and integrity.).
How can I check crates.io dependencies for CVE-2025-52884?
Run the dependency tree command: 'inspect dependencies for risc0-ethereum-contracts'. 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-gjv3-89hh-9xq2",
  "modified" : "2025-06-25T21:28:00Z",
  "published" : "2025-06-25T21:27:59Z",
  "aliases" : [ "CVE-2025-52884" ],
  "summary" : "RISC Zero Ethereum invalid commitment with digest value of zero accepted by Steel.validateCommitment",
  "details" : "### Impact\n\nPrior to 2.1.1 and 2.2.0, the `Steel.validateCommitment` Solidity library function will return `true` for a crafted commitment with a digest value of zero.\n\nThis violates the semantics of `validateCommitment`, as this does not commitment to a block that is in the current chain. Because the digest is zero, it does not correspond to any block and there exist no known openings. As a result, this commitment will never be produced by a correct zkVM guest using Steel. Leveraging this bug to compromise the soundness of an application using Steel would require a separate bug or misuse of the Steel library, which is expected to be used to validate the root of state opening proofs (e.g. having the guest commit to a digest of zero, or failing to check the zkVM proof).\n\nBecause this bug does not risk application integrity, correctly written applications are not at risk.\n\n### Fix\n\nPlease see [#605] for a full description of the bug, and the fix. This fix has been released as part of `risc0-ethereum` [2.1.1] and [2.2.0].\n\n### Recommended actions\n\nUsers for the `Steel` Solidity library versions 2.1.0 or earlier should ensure they are using `Steel.validateCommitment` in tandem with zkVM proof verification of a Steel program, as shown in the [ERC-20 counter example][example], and [documentation]. This is the correct usage of Steel, and users following this pattern are not at risk, and do not need to take action.\n\nUsers not verifying a zkVM proof of a Steel program should update their application to do so, as this is incorrect usage of Steel.\n\n### Credit\n\nA thank you to Daniel526 on HackenProof for reporting this issue\n\n[#605]: https://github.com/risc0/risc0-ethereum/pull/605\n[example]: https://github.com/risc0/risc0-ethereum/blob/ff0cb9253a87945b653b825711b8b5075f8b7545/examples/erc20-counter/contracts/src/Counter.sol#L56-L63\n[documentation]: https://docs.beboundless.xyz/developers/steel/how-it-works#verifying-the-proof-onchain\n[2.1.1]: https://github.com/risc0/risc0-ethereum/releases/tag/v2.1.1\n[2.2.0]: https://github.com/risc0/risc0-ethereum/releases/tag/v2.2.0",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "risc0-ethereum-contracts"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0-ethereum/security/advisories/GHSA-gjv3-89hh-9xq2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-52884"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0-ethereum/pull/605"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0-ethereum/commit/3bbac859c7132b21ba5fdf2d47f1dd52e7e73d98"
  }, {
    "type" : "WEB",
    "url" : "https://docs.beboundless.xyz/developers/steel/how-it-works#verifying-the-proof-onchain"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/risc0/risc0-ethereum"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0-ethereum/blob/ff0cb9253a87945b653b825711b8b5075f8b7545/examples/erc20-counter/contracts/src/Counter.sol#L56-L63"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0-ethereum/releases/tag/v2.1.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/risc0/risc0-ethereum/releases/tag/v2.2.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-159" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-25T21:27:59Z",
    "nvd_published_at" : "2025-06-24T21:15:26Z"
  }
}