MEDIUM · CVSS 3.1 5.3

GHSA-pm66-mrhh-2gmp: Panic in RSASSA-PSS verification with automatic salt length on small public keys

Published 2026-11-28 · Updated 2026-11-29 · Also known as RUSTSEC-2026-0621

Summary

The sad-rsa crate contains a vulnerability where RSASSA-PSS signature verification panics if the public key is too small and automatic salt length is used. Developers using this library to verify signatures against untrusted public keys should update to the latest version immediately.

Who is affected

This flaw allows an attacker to cause a denial-of-service condition by triggering an application crash when verifying malicious signatures. It specifically impacts applications that perform PSS signature verification with automatic salt detection on public keys that do not enforce a minimum bit length. If an application is configured to use panic=abort, the entire process will terminate upon processing a crafted signature.

Exploitability

The vulnerability is exploitable remotely with low attack complexity and requires no special privileges or user interaction. While the impact on availability is limited, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-30. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
crates.io sad-rsa >= 0.0.0-0, < 0.10.6 0.10.6 cargo update -p sad-rsa --precise 0.10.6

CVSS 3.1 vector

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

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityLow

FAQ

Does this vulnerability allow for arbitrary code execution?

No, the vulnerability is a panic, which leads to a denial-of-service condition, not code execution.

Are PKCS#1 v1.5 signatures affected?

No, the description explicitly states that PKCS#1 v1.5 signatures, as well as encryption and decryption, are not affected.

What is the specific trigger condition for the panic?

The panic occurs when the modulus is too small for the hash function (at most 8 * hLen + 9 bits) and the attacker provides a signature whose encoded message ends in the byte 0xBC.

Original advisory description
RSASSA-PSS signature verification can panic when the salt length is detected from the signature and the public key is too small for the hash function. This affects verification through `pss::VerifyingKey::new_with_auto_salt_len`, and through `RsaPublicKey::verify` with a `Pss` whose `salt_len` is `None`. Verification with a fixed salt length is not affected. PKCS#1 v1.5 signatures, encryption and decryption are not affected. The panic happens when the modulus is at most `8 * hLen + 9` bits, where `hLen` is the output size of the hash in bytes: 521 bits with SHA-512, 393 bits with SHA-384, 265 bits with SHA-256. The attacker needs to supply the public key and a signature whose encoded message ends in the byte `0xBC`. No private key is needed. An application that verifies PSS signatures with automatic salt length against public keys it does not control, and that does not enforce a minimum key size, can lose a worker, or the whole process when built with `panic = "abort"`. Fixed in 0.10.6, where verification returns an error when the encoded message is too short to hold the hash. If you cannot upgrade, reject public keys with a modulus below 1024 bits before verifying, or verify with a fixed salt length, or wrap verification in `catch_unwind` when panics unwind.

References

Source records: RUSTSEC-2026-0621 (OSV.dev).