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

Published Jan 6, 2026
·
Updated

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.

Other sources

When creating a RSA private key from its components, the construction panics, instead of returning an error, when one of the primes is 1.

Discovered by Christian Reitter from Radically Open Security during a security review for Proton AG.

GitHub

Affected Software

2 affected componentsFixes available
rust/rsa<=0.9.9
0.9.10
RustCrypto Rsa Rust<0.9.10

Event History

Jan 6, 2026
Advisory Published
via GitHub·06:14 PM
Data Sourced
via GitHub·06:14 PM
DescriptionWeaknessAffected Software
Jan 8, 2026
CVE Published
via MITRE·02:06 PM
Data Sourced
via MITRE·02:06 PM
DescriptionWeakness
Data Sourced
via NVD·02:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:15 PM
RemedyAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-21895?

CVE-2026-21895 has been classified as a moderate severity vulnerability due to the potential for panic during RSA key generation.

2

How do I fix CVE-2026-21895?

To fix CVE-2026-21895, upgrade to version 0.9.10 of the 'rsa' package in Rust.

3

What software is affected by CVE-2026-21895?

CVE-2026-21895 affects versions of the 'rsa' package from Rust up to and including 0.9.9.

4

What happens if I use a prime of '1' with CVE-2026-21895?

Using a prime of '1' in RSA key generation with CVE-2026-21895 will result in a panic instead of an error.

5

Who discovered CVE-2026-21895?

CVE-2026-21895 was discovered by Christian Reitter from Radically Open Security during a security review for Proton AG.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203