CVE-2026-21895: rsa crate has potential panic on a prime being equal to 1
(updated )
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
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 →