CVE-2026-21895
JSON

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 packageVersionsReported by
RustCrypto RSA< 0.9.10, before 0.9.10CVE List, NVD
rsa (crates.io)before 0.9.10GitHub Advisory Database

All scores

GitHub_M2.7low CVSS:4.0CVSS: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
GitHublow CVSS:4.0CVSS: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
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Classification

CWE-703

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

SourceRecordLicence
CVE ListCVE-2026-21895 changed 2026-01-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-9c48-w39g-hm26 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-21895 changed 2026-06-17Public domain