Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-21895: CWE-703: Improper Check or Handling of Exceptional Conditions in RustCrypto RSA

0
Low
VulnerabilityCVE-2026-21895cvecve-2026-21895cwe-703
Published: Thu Jan 08 2026 (01/08/2026, 14:06:29 UTC)
Source: CVE Database V5
Vendor/Project: RustCrypto
Product: RSA

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.

AI-Powered Analysis

AILast updated: 01/08/2026, 14:34:39 UTC

Technical Analysis

CVE-2026-21895 identifies a vulnerability in the RustCrypto RSA crate, a Rust language implementation of RSA cryptography. The flaw is related to improper handling of exceptional conditions during RSA private key construction from its prime components. Specifically, in versions before 0.9.10, if one of the primes is set to 1, the constructor panics (causing a runtime crash) instead of returning a controlled error. This behavior is classified under CWE-703, which concerns improper checks or handling of exceptional conditions. The panic can lead to denial-of-service (DoS) scenarios where applications relying on this crate may unexpectedly terminate or become unstable when processing malformed or maliciously crafted key components. However, this vulnerability does not affect the cryptographic strength or confidentiality of RSA keys, as it does not allow key extraction or cryptographic bypass. The issue was addressed in version 0.9.10 by ensuring that invalid prime inputs are properly rejected with error returns rather than panics. The CVSS 4.0 score of 2.7 reflects a low-severity issue with network attack vector, no privileges or user interaction required, and limited impact confined to availability (denial of service). No known exploits have been reported in the wild, indicating limited active threat. The vulnerability is relevant for developers and organizations using the RustCrypto RSA crate in their software, especially those constructing RSA keys dynamically or from external inputs.

Potential Impact

For European organizations, the primary impact of CVE-2026-21895 is the potential for denial-of-service conditions in applications that use vulnerable versions of the RustCrypto RSA crate. This could disrupt services that rely on RSA key operations, such as secure communications, authentication, or digital signatures. While the vulnerability does not compromise confidentiality or integrity of cryptographic keys, unexpected application crashes can affect availability and reliability of critical systems. Organizations in sectors with high reliance on Rust-based cryptographic libraries—such as financial services, telecommunications, and government agencies—may experience operational disruptions if they process malformed RSA key components. The impact is more pronounced in environments where RSA keys are dynamically generated or imported from untrusted sources without sufficient validation. Given the low CVSS score and absence of known exploits, the threat is moderate but should not be ignored, especially in high-availability or security-sensitive contexts.

Mitigation Recommendations

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.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-01-05T17:24:36.929Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 695fbd1fc901b06321f46f67

Added to database: 1/8/2026, 2:20:15 PM

Last enriched: 1/8/2026, 2:34:39 PM

Last updated: 1/9/2026, 9:04:19 AM

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats