Description
In RNP version 0.18.0 a refactoring regression causes the symmetric session key used for Public-Key Encrypted Session Key (PKESK) packets to be left uninitialized except for zeroing, resulting in it always being an all-zero byte array. Any data encrypted using public-key encryption in this release can be decrypted trivially by supplying an all-zero session key, fully compromising confidentiality. The vulnerability affects only public key encryption (PKESK packets). Passphrase-based encryption (SKESK packets) is not affected. Root cause: Vulnerable session key buffer used in PKESK packet generation. The defect was introduced in commit `7bd9a8dc356aae756b40755be76d36205b6b161a` where initialization logic inside `encrypted_build_skesk()` only randomized the key for the SKESK path and omitted it for the PKESK path.
Problem types
CWE-330 Use of Insufficiently Random Values
Product status
0.18.0
Timeline
| 2025-06-19: | RNP 0.18.0 released (vulnerability introduced). |
| 2025-11-07: | Vulnerability discovered and reported by Johannes Roth (MTG AG). |
| 2025-11-19: | CVE-2025-13402 assigned by Red Hat. |
| 2025-11-20: | CVE-2025-13470 assigned by Ribose/MITRE. |
| 2025-11-20: | Fix developed and tested. |
| 2025-11-21: | Planned release date for RNP 0.18.1. |
| 2025-11-21: | Public disclosure (same day as release). |
Credits
Johannes Roth (MTG AG)
References
github.com/...ommit/7bd9a8dc356aae756b40755be76d36205b6b161a (Introducing commit)
launchpad.net/ubuntu/+source/rnp (Ubuntu package)
aur.archlinux.org/packages/rnp (Arch Linux AUR package)
packages.gentoo.org/packages/dev-util/librnp (Bugzilla report (may become public))
bugzilla.redhat.com/show_bug.cgi?id=2415863
access.redhat.com/security/cve/cve-2025-13402
open.ribose.com/advisories/ra-2025-11-20/
github.com/rnpgp/rnp/releases/tag/v0.18.1