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

- Severity: Low 2.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 39% of CVEs (2026-12-01)
- Published: 2026-01-06T18:14:08.000Z
- Modified: 2026-09-10T03:50:32.802Z
- Also known as: GHSA-9c48-w39g-hm26
- Weaknesses: CWE-703
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- RustCrypto RSA: < 0.9.10; before 0.9.10
- rsa (crates.io): before 0.9.10

## Every score

- GitHub_M: CVSS:4.0 2.7 Low `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`
- GitHub: CVSS:4.0 Low `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`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://github.com/RustCrypto/RSA/security/advisories/GHSA-9c48-w39g-hm26> (vendor-advisory, web)
- <https://github.com/RustCrypto/RSA/commit/2926c91bef7cb14a7ccd42220a698cf4b1b692f7> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-21895> (advisory)
- <https://github.com/RustCrypto/RSA> (package)

## Sources

- CVE List: [CVE-2026-21895](https://www.cve.org/CVERecord?id=CVE-2026-21895), CVE Terms of Use, modified 2026-01-08
- GitHub Advisory Database: [GHSA-9c48-w39g-hm26](https://github.com/advisories/GHSA-9c48-w39g-hm26), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-21895](https://nvd.nist.gov/vuln/detail/CVE-2026-21895), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-21895 · Whole record: https://cve.day/CVE-2026-21895.json · Rebuilt by cve.day 2026-11-25T22:59:12.666Z
