CVE-2026-21895Improper Check or Handling of Exceptional Conditions in Rust-rsa

Severity
2.7LOWNVD
EPSS
0.0%
top 94.77%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedJan 8
Latest updateFeb 13

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.

CVSS vector

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

Affected Packages6 packages

NVDrustcrypto/rsa< 0.9.10
crates.iorustcrypto/rsa< 0.9.10
debiandebian/rust-rsa< rust-rsa 0.9.10-1 (forky)
crates.iopgp/pgp0.16.0-alpha.00.19.0

Patches

🔴Vulnerability Details

5
OSV
rPGP vulnerable to parser crash on crafted RSA secret key packets through CVE-2026-218952026-02-13
GHSA
rPGP vulnerable to parser crash on crafted RSA secret key packets through CVE-2026-218952026-02-13
OSV
CVE-2026-21895: The `rsa` crate is an RSA implementation written in rust2026-01-08
GHSA
rsa crate has potential panic on a prime being equal to 12026-01-06
OSV
rsa crate has potential panic on a prime being equal to 12026-01-06

📋Vendor Advisories

3
Microsoft
rsa crate has potential panic on a prime being equal to 12026-01-13
Red Hat
RSA: RSA crate: Denial of Service due to malformed prime in private key generation2026-01-08
Debian
CVE-2026-21895: rust-rsa - The `rsa` crate is an RSA implementation written in rust. Prior to version 0.9.1...2026

🕵️Threat Intelligence

1
Wiz
CVE-2026-21895 Impact, Exploitability, and Mitigation Steps | Wiz