# CVE-2025-13470: RNP 0.18.0 Vulnerable PKESK session keys

> Attackers can trivially decrypt public-key encrypted data due to uninitialized session keys, compromising confidentiality for users of the RNP library.

- **Severity:** High 7.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/AU:Y/RE:H/U:Red`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Nov 2025
- **Updated:** 21 Nov 2025
- **Also known as:** DEBIAN-CVE-2025-13470, GHSA-r3r8-w3g2-hq7h, UBUNTU-CVE-2025-13470

## What is CVE-2025-13470?

CVE-2025-13470 is a high-severity vulnerability in Ribose RNP, published on 21 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-330 (Use of Insufficiently Random Values)

## Which versions are affected by CVE-2025-13470?


## How do I fix CVE-2025-13470?

Upgrade to a fixed version.

## Is CVE-2025-13470 being exploited?

There is no known exploitation of CVE-2025-13470 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-13470 and fix it if it is affected.

What it is: CVE-2025-13470 is a high-severity vulnerability in Ribose RNP, published on 21 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-13470 in the wild and no public exploit code.

Affected product: Ribose RNP. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-13470/ (Markdown: https://insights.sbomify.com/CVE-2025-13470/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-13470
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-13470
- OSV: https://osv.dev/vulnerability/CVE-2025-13470

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-13470/
Summaries are generated and may contain mistakes; the official description above is the record.
