ghsa-g3qg-6746-3mg9
Vulnerability from github
Published
2025-06-20 18:08
Modified
2025-06-27 23:59
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. We have evaluated the severity of the vulnerability as “Critical,” and paid a 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

We 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.

Show details on source website


{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.0.2"
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "risc0-zkvm"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.0.0"
            },
            {
              "fixed": "2.1.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.0.3"
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "risc0-circuit-rv32im"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.0.0"
            },
            {
              "fixed": "2.0.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-52484"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-345"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-06-20T18:08:04Z",
    "nvd_published_at": "2025-06-20T18:15:28Z",
    "severity": "LOW"
  },
  "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.\n\nThis vulnerability was reported by Christoph Hochrainer via our Hackenproof bug bounty. We have evaluated the severity of the vulnerability as \u201cCritical,\u201d and paid a bounty. \n\nThe fix for the circuit was implemented in [zirgen/pull/238](https://github.com/risc0/zirgen/pull/238), and the update to risc0 was implemented in [risc0/pull/3181](https://github.com/risc0/risc0/pull/3181). Impacted on-chain verifiers have already 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). \n\n## Mitigation\nWe recommend all impacted users upgrade as soon as possible.\n\nRust 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.\n\nSmart contract applications using the official [RISC Zero Verifier Router](https://dev.risczero.com/api/blockchain-integration/contracts/verifier#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.\n\nSmart contract applications not using the verifier router should update their contracts to send verification calls to the 2.1 version of the verifier.",
  "id": "GHSA-g3qg-6746-3mg9",
  "modified": "2025-06-27T23:59:02Z",
  "published": "2025-06-20T18:08:04Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/risc0/risc0/security/advisories/GHSA-g3qg-6746-3mg9"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-52484"
    },
    {
      "type": "WEB",
      "url": "https://github.com/risc0/risc0/pull/3181"
    },
    {
      "type": "WEB",
      "url": "https://github.com/risc0/zirgen/pull/238"
    },
    {
      "type": "WEB",
      "url": "https://github.com/risc0/risc0/commit/006d86c363b16d2b2ac42d32d832a209ff8ab4c9"
    },
    {
      "type": "WEB",
      "url": "https://github.com/risc0/risc0/commit/1873bbb8a56793edd1f6195242d184cf6cc5175d"
    },
    {
      "type": "WEB",
      "url": "https://github.com/risc0/risc0/commit/67f2d81c638bff5f4fcfe11a084ebb34799b7a89"
    },
    {
      "type": "WEB",
      "url": "https://github.com/risc0/zirgen/commit/e0e2918302c93e956f73ca2e44aef2b861d8c3ae"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/risc0/risc0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "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/E:U",
      "type": "CVSS_V4"
    }
  ],
  "summary": "zkVM Underconstrained Vulnerability"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…