What’s Vulnerable › Vulnerabilities
CVE-2026-21895: rsa crate has potential panic on a prime being equal to 1
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-01-08 · updated 2026-06-17
- Weakness: CWE-703
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 products
- RustCrypto RSA: before 0.9.10 — fixed in 0.9.10
How to fix
Upgrade to a fixed version: RustCrypto RSA 0.9.10. Check the vendor advisory for mitigations.
References
- https://github.com/RustCrypto/RSA/commit/2926c91bef7cb14a7ccd42220a698cf4b1b692f7
- https://github.com/RustCrypto/RSA/security/advisories/GHSA-9c48-w39g-hm26
Get alerted when CVE-2026-21895 or the next vulnerability affects your stack