2.7low
rsa crate has potential panic on a prime being equal to 1
- Severity
- 2.7low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.44% (higher than 39% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-9c48-w39g-hm26
Description
The `rsa` crate is an RSA implementation written in rust. Prior to version 0.9.10, when creating a RSA private key from its components, the construction panics instead of returning an error when one of the primes is `1`. Version 0.9.10 fixes the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| RustCrypto RSA | < 0.9.10, before 0.9.10 | CVE List, NVD |
| rsa (crates.io) | before 0.9.10 | GitHub Advisory Database |
All scores
| GitHub_M | 2.7low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
The `rsa` crate is an RSA implementation written in rust. Prior to version 0.9.10, when creating a RSA private key from its components, the construction panics instead of returning an error when one of the primes is `1`. Version 0.9.10 fixes the issue.
GitHub Advisory Database
When creating a RSA private key from its components, the construction panics, instead of returning an error, when one of the primes is 1.
Discovered by Christian Reitter from Radically Open Security during a security review for Proton AG.
NVD (es)
La caja 'rsa' es una implementación RSA escrita en Rust. Antes de la versión 0.9.10, al crear una clave privada RSA a partir de sus componentes, la construcción entra en pánico en lugar de devolver un error cuando uno de los números primos es '1'. La versión 0.9.10 soluciona el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-21895 changed 2026-01-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9c48-w39g-hm26 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-21895 changed 2026-06-17 | Public domain |