{"id":"RUSTSEC-2026-0583","aliases":["GHSA-3hj7-mch7-c7cc"],"title":"Panics during RSA private-key construction, validation, or re-encoding","originalDescription":"`RsaPrivateKey` private-key construction, validation, and serialization can panic across three classes of inputs, as well as when re-encoding certain valid keys: - `RsaPrivateKey::from_components` and PKCS#1 or PKCS#8 private-key decoding (DER or PEM) can panic during validation when a supplied factor equals 1, because `RsaPrivateKey::validate()` let a factor of 1 reach a later check that panicked. - `RsaPrivateKey::from_primes` and `RsaPrivateKey::from_p_q` can panic during construction when a supplied factor is 0, 1, or even. - Prime recovery in `RsaPrivateKey::from_components` can panic when the private exponent is 0. - For a key, including a valid one, whose first prime occupies more limbs than the second, `crt_coefficient`, `to_pkcs1_der`, `to_pkcs8_der`, and `serde` serialization can panic. An application that imports untrusted private keys or factors, or re-encodes such keys, can lose a worker, or the whole process when built with `panic = \"abort\"`. Public-key parsing is not affected. Fixed in 0.10.4, which rejects factors below 2, even factors, repeated factors, and a zero private exponent during prime recovery, and computes the CRT coefficient and re-encodes valid two-prim","severity":{"cvss":null,"vector":null,"label":null},"exploitation":{"kev":null,"epss":null,"exploitDb":null},"affected":[{"ecosystem":"crates.io","name":"sad-rsa","range":">=0.0.0-0, <0.10.4","fixed":"0.10.4"}],"references":[{"url":"https://crates.io/crates/sad-rsa","type":"package"},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0583.html","type":"advisory"},{"url":"https://github.com/sadco-io/sad-rsa/releases/tag/v0.10.4","type":"web"}],"sources":[{"name":"osv","at":"2026-11-20T13:40:40.939Z","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0583","license":"CC-BY 4.0","firstSeenAt":"2026-11-20T13:07:28.452Z"}],"firstSeenAt":"2026-11-20T13:07:28.452Z","publishedAt":"2026-11-19T12:00:00.000Z","modifiedAt":"2026-11-20T13:00:02.895Z"}