CVE-2026-21895: Rsa Rsa Crate Has Potential Panic Vulnerability
LOWCVE-2026-21895 is a LOW rsa crate has potential panic vulnerability (CWE-703: Improper Check or Handling of Exceptional Conditions) affecting Rsa libraries in the crates.io ecosystem. The issue involves rsa crate has potential panic on a prime being equal to 1. Remediation is available by upgrading affected packages to version 0.9.10.
CVE-2026-21895 at a Glance
How to Fix CVE-2026-21895
To remediate this vulnerability, upgrade all affected Rsa dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rsa to 0.9.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rsa
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-21895, inspect your project dependencies for Rsa:
inspect dependencies for rsa
Analyze the terminal output to locate any version of Rsa in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.10), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-703: Improper Check or Handling of Exceptional Conditions, where the product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product. In Rsa, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-21895 Affected Rsa Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rsa
|
crates.io |
< 0.9.10
|
0.9.10
|
References
Frequently Asked Questions
What is CVE-2026-21895?
Which Rsa versions are affected?
What version fixes CVE-2026-21895?
Is rsa affected?
What CWE is associated with CVE-2026-21895?
How can I check crates.io dependencies for CVE-2026-21895?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9c48-w39g-hm26",
"modified" : "2026-01-08T21:18:57Z",
"published" : "2026-01-06T18:14:08Z",
"aliases" : [ "CVE-2026-21895" ],
"summary" : "rsa crate has potential panic on a prime being equal to 1",
"details" : "When creating a RSA private key from its components, the construction panics, instead of returning an error, when one of the primes is `1`. \n\nDiscovered by Christian Reitter from [Radically Open Security](https://www.radicallyopensecurity.com/) during a security review for [Proton AG](https://proton.me/).",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "rsa"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.9.10"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.9.9"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/RustCrypto/RSA/security/advisories/GHSA-9c48-w39g-hm26"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-21895"
}, {
"type" : "WEB",
"url" : "https://github.com/RustCrypto/RSA/commit/2926c91bef7cb14a7ccd42220a698cf4b1b692f7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/RustCrypto/RSA"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-703" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-06T18:14:08Z",
"nvd_published_at" : "2026-01-08T14:15:57Z"
}
}