Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. rsa
  4. ›
  5. CVE-2026-21895

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

January 6, 2026 (updated January 8, 2026)

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.

References

  • github.com/RustCrypto/RSA
  • github.com/RustCrypto/RSA/commit/2926c91bef7cb14a7ccd42220a698cf4b1b692f7
  • github.com/RustCrypto/RSA/security/advisories/GHSA-9c48-w39g-hm26
  • github.com/advisories/GHSA-9c48-w39g-hm26
  • nvd.nist.gov/vuln/detail/CVE-2026-21895

Code Behaviors & Features

Detect and mitigate CVE-2026-21895 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.9.10

Fixed versions

  • 0.9.10

Solution

Upgrade to version 0.9.10 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-703: Improper Check or Handling of Exceptional Conditions

Source file

cargo/rsa/CVE-2026-21895.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:56 +0000.