Rust advisories / sequoia-openpgp
Vulnerability MediumRUSTSEC-2025-0136 · sequoia-openpgp
RUSTSEC-2025-0136: Underflow in aes_key_unwrap function
Short answerA security vulnerability in the sequoia-openpgp crate: Underflow in aes_key_unwrap function. Medium severity (CVSS 4.3). Fixed in 2.1.0: update to a fixed version.
| Crate | sequoia-openpgp |
|---|---|
| Type | Vulnerability (denial-of-service) |
| Affected versions | Before 2.1.0. |
| Fixed in | 2.1.0 |
| Severity | Medium, CVSS 4.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L |
| Published | 2025-11-07 |
| Last changed | 2025-12-17 |
| Also known as | CVE-2025-67897, GHSA-v6x3-9r38-r27q |
| Affected functions | sequoia_openpgp::crypto::ecdh::aes_key_unwrap |
What to do
- See which version you have:
cargo tree -i sequoia-openpgp(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p sequoia-openpgp. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplesequoia-openpgp = "2.1.0") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
The aes_key_unwrap function would panic if passed a ciphertext that was too short. In a debug build, it would panic due to a subtraction underflow. In a release build, it would use the small negative quantity to allocate a vector. Since the allocator expects an unsigned quantity, the negative value would be interpreted as a huge allocation. The allocator would then fail to allocate the memory and panic.
An attacker could trigger this panic by sending a victim an encrypted message whose PKESK or SKESK packet has been specially modified. When the victim decrypts the message, the program would crash.
References
- Package: crates.io/crates/sequoia-openpgp
- Advisory: rustsec.org/advisories/RUSTSEC-2025-0136.html
- Web: gitlab.com/sequoia-pgp/sequoia/-/blob/b59886e5e7bdf7169ed330f309a6633d131776e5/openpgp/NEWS#L7-L26
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for sequoia-openpgp
Up next
Same cratesequoia-openpgp: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?