rustcrypto/rsa · Security

rsa crate has potential panic on a prime being equal to 1

GHSA ID
GHSA-9c48-w39g-hm26
CVE ID
CVE-2026-21895
Severity
low
Published
Updated
CVSS v4
2.7 · 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

Description

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.

CWEs

References