GHSA-3hj7-mch7-c7cc
Panics during RSA private-key construction, validation, or re-encoding
Also known as RUSTSEC-2026-0583
Mitigation
- Upgrade sad-rsa to 0.10.4 or later.
Who should check
- Projects that depend on crates.io package sad-rsa (>= 0.0.0-0, < 0.10.4)
Vulnerability facts
- Affected
- sad-rsa >= 0.0.0-0, < 0.10.4
- Fixed in
- 0.10.4
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
`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-prime keys when the first prime occupies more limbs than the second. If you cannot upgrade to 0.10.4, isolate the entire import, construction, CRT calculation, or serialization in a separate process and treat an abnormal exit as an operation failure, or use `catch_unwind` around the entire operation when panics unwind.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io sad-rsa | >= 0.0.0-0, < 0.10.4 | 0.10.4 | osv |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by GHSA-3hj7-mch7-c7cc. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/GHSA-3hj7-mch7-c7cc.md Affected: sad-rsa >= 0.0.0-0, < 0.10.4 Fixed in: 0.10.4 Steps: 1. Search this machine and project for sad-rsa (crates.io): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Vendor advisories
FAQ
Is GHSA-3hj7-mch7-c7cc being exploited?
There is no confirmed exploitation: GHSA-3hj7-mch7-c7cc is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is GHSA-3hj7-mch7-c7cc?
It has no CVSS score yet. Unknown.
Which versions are affected by GHSA-3hj7-mch7-c7cc?
sad-rsa >= 0.0.0-0, < 0.10.4.
Is there a fix for GHSA-3hj7-mch7-c7cc?
Yes. Fixed in 0.10.4. Upgrade sad-rsa to 0.10.4 or later.
How do I check if I'm affected by GHSA-3hj7-mch7-c7cc?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.