7.8high
OpenVM byte decomposition of pc in AUIPC chip can overflow
- Severity
- 7.8high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.49% (higher than 43% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jf2r-x3j4-23m7
Description
OpenVM is a performant and modular zkVM framework built for customization and extensibility. In version 1.0.0, OpenVM is vulnerable to overflow through byte decomposition of pc in AUIPC chip. A typo results in the highest limb of pc being range checked to 8-bits instead of 6-bits. This results in the if statement never being triggered because the enumeration gives i=0,1,2, when instead the enumeration should give i=1,2,3, leaving pc_limbs[3] range checked to 8-bits instead of 6-bits. This leads to a vulnerability where the pc_limbs decomposition differs from the true pc, which means a malicious prover can make the destination register take a different value than the AUIPC instruction dictates, by making the decomposition overflow the BabyBear field. This issue has been patched in version 1.1.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| openvm-org openvm | = 1.0.0 | CVE List |
| openvm (crates.io) | from 1.0.0 before 1.1.0 | GitHub Advisory Database |
All scores
| GitHub_M | 7.8high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:P |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:P |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
OpenVM is a performant and modular zkVM framework built for customization and extensibility. In version 1.0.0, OpenVM is vulnerable to overflow through byte decomposition of pc in AUIPC chip. A typo results in the highest limb of pc being range checked to 8-bits instead of 6-bits. This results in the if statement never being triggered because the enumeration gives i=0,1,2, when instead the enumeration should give i=1,2,3, leaving pc_limbs[3] range checked to 8-bits instead of 6-bits. This leads to a vulnerability where the pc_limbs decomposition differs from the true pc, which means a malicious prover can make the destination register take a different value than the AUIPC instruction dictates, by making the decomposition overflow the BabyBear field. This issue has been patched in version 1.1.0.
GitHub Advisory Database
The fix to https://cantina.xyz/code/c486d600-bed0-4fc6-aed1-de759fd29fa2/findings/21 has a typo that still results in the highest limb of pc being range checked to 8-bits instead of 6-bits.
In the AIR, we do https://github.com/openvm-org/openvm/blob/0f94c8a3dfa7536c1231465d1bdee5fc607a5993/extensions/rv32im/circuit/src/auipc/core.rs#L135
for (i, limb) in pc_limbs.iter().skip(1).enumerate() {
if i == pc_limbs.len() - 1 {
It should be
for (i, limb) in pc_limbs.iter().enumerate().skip(1) {
Right now the if statement is never triggered because the enumeration gives i=0,1,2 when we instead want i=1,2,3. What this means is that pc_limbs[3] is range checked to 8-bits instead of 6-bits.
This leads to a vulnerability where the pc_limbs decomposition differs from the true pc, which means a malicious prover can make the destination register take a different value than the AUIPC instruction dictates, by making the decomposition overflow the BabyBear field.
NVD (es)
OpenVM es un framework zkVM modular y de alto rendimiento, diseñado para la personalización y la extensibilidad. En la versión 1.0.0, OpenVM es vulnerable a un desbordamiento debido a la descomposición de bytes de pc en el chip AUIPC. Un error tipográfico provoca que la rama más alta de pc se compruebe a 8 bits en lugar de 6. Esto provoca que la instrucción if nunca se active, ya que la enumeración devuelve i=0,1,2, cuando debería dar i=1,2,3, dejando el rango de pc_limbs[3] comprobado a 8 bits en lugar de 6. Esto genera una vulnerabilidad donde la descomposición de pc_limbs difiere de la verdadera pc, lo que significa que un probador malicioso puede hacer que el registro de destino tome un valor diferente al que dicta la instrucción AUIPC, provocando que la descomposición desborde el campo BabyBear. Este problema se ha corregido en la versión 1.1.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-46723 changed 2025-05-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jf2r-x3j4-23m7 changed 2025-05-05 | CC-BY-4.0 |
| NVD | CVE-2025-46723 changed 2026-06-17 | Public domain |