CVE-2026-21895: RustCrypto RSA · Improper Check or Handling of Exceptional Conditions
Affects RustCrypto RSASource CVE Database V5
Not known to be exploited · CVSS 2.7 Low : upgrade to 0.9.10 when convenient.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 38% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.9.10
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:UExploitation evidence
Disclosed: evidence found.
CVE published 8 Jan 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Upgrade RSA and rustcrypto/rsa to 0.9.10.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| RustCryptoRSA | Affected
| Fixed in
|
crates.iorustcrypto/rsapkg:cargo/rustcrypto/rsaOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2026-21895, European organizations should: 1) Upgrade all RustCrypto RSA crate dependencies to version 0.9.10 or later, where the issue is fixed. 2) Audit code that constructs RSA private keys from components to ensure proper validation of prime factors and error handling, preventing panics from propagating. 3) Implement input validation and sanitization for any externally sourced RSA key components to reject invalid primes such as 1 before key construction. 4) Incorporate robust exception handling around cryptographic operations to gracefully handle unexpected errors without crashing the application. 5) Monitor application logs for panic events related to RSA key handling to detect potential exploitation attempts or malformed inputs. 6) For critical systems, consider adding redundancy or failover mechanisms to minimize service disruption from potential DoS caused by this vulnerability. 7) Engage with RustCrypto community updates and security advisories to stay informed about related vulnerabilities and patches.
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.