# CVE-2025-5994: Cache poisoning via the ECS-enabled Rebirthday Attack

> Attackers can poison DNS caches in Unbound resolvers with ECS enabled, leading to data modification and security bypass.

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/R:U/V:C`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Jul 2025
- **Updated:** 3 Nov 2025
- **Also known as:** ALPINE-CVE-2025-5994, ALSA-2025:11849, ALSA-2025:11884, ALSA-2025:12064, CLEANSTART-2026-NH76134, CLSA-2025-1754649153, CLSA-2026-1768411996, DEBIAN-CVE-2025-5994, GHSA-xrv5-2wwg-jp3r, OESA-2025-1974, RHSA-2025:11849, RHSA-2025:11884, RHSA-2025:12064, RHSA-2025:12416, RHSA-2025:12520, RHSA-2025:12523, RHSA-2025:12929, RHSA-2025:13575, RHSA-2025:13576, RHSA-2025:13577, RLSA-2025:11849, RLSA-2025:11884, UBUNTU-CVE-2025-5994, USN-7666-1, openSUSE-SU-2025:15435-1

## What is CVE-2025-5994?

CVE-2025-5994 is a high-severity vulnerability in NLnet Labs Unbound, published on 16 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A multi-vendor cache poisoning vulnerability named 'Rebirthday Attack' has been discovered in caching resolvers that support EDNS Client Subnet (ECS). Unbound is also vulnerable when compiled with ECS support, i.e., '--enable-subnet', AND configured to send ECS information along with queries to upstream name servers, i.e., at least one of the 'send-client-subnet', 'client-subnet-zone' or 'client-subnet-always-forward' options is used. Resolvers supporting ECS need to segregate outgoing queries to accommodate for different outgoing ECS information. This re-opens up resolvers to a birthday paradox attack (Rebirthday Attack) that tries to match the DNS transaction ID in order to cache non-ECS poisonous replies.

Weakness: CWE-349 (Acceptance of Extraneous Untrusted Data With Trusted Data)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `python3-unbound` | AlmaLinux:10 | All versions | 1.20.0-12.el10_0 |
| `unbound` | AlmaLinux:10 | All versions | 1.20.0-12.el10_0 |
| `unbound-anchor` | AlmaLinux:10 | All versions | 1.20.0-12.el10_0 |
| `unbound-devel` | AlmaLinux:10 | All versions | 1.20.0-12.el10_0 |
| `unbound-dracut` | AlmaLinux:10 | All versions | 1.20.0-12.el10_0 |
| `unbound-libs` | AlmaLinux:10 | All versions | 1.20.0-12.el10_0 |
| `python3-unbound` | AlmaLinux:8 | All versions | 1.16.2-5.9.el8_10 |
| `unbound` | AlmaLinux:8 | All versions | 1.16.2-5.9.el8_10 |
| `unbound-devel` | AlmaLinux:8 | All versions | 1.16.2-5.9.el8_10 |
| `unbound-libs` | AlmaLinux:8 | All versions | 1.16.2-5.9.el8_10 |
| `python3-unbound` | AlmaLinux:9 | All versions | 1.16.2-19.el9_6.1 |
| `unbound` | AlmaLinux:9 | All versions | 1.16.2-19.el9_6.1 |
| `unbound-devel` | AlmaLinux:9 | All versions | 1.16.2-19.el9_6.1 |
| `unbound-dracut` | AlmaLinux:9 | All versions | 1.16.2-19.el9_6.1 |
| `unbound-libs` | AlmaLinux:9 | All versions | 1.16.2-19.el9_6.1 |
| `python3-unbound` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `python3-unbound-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-anchor` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-anchor-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-debugsource` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-devel` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-dracut` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-libs` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-libs-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `unbound-utils-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:1.20.0-12.el10_0 |
| `python3-unbound` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.16.2-5.9.el8_10 |
| `python3-unbound-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.16.2-5.9.el8_10 |
| `unbound` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.16.2-5.9.el8_10 |
| `unbound-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.16.2-5.9.el8_10 |
| `unbound-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.16.2-5.9.el8_10 |
| `unbound-devel` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.16.2-5.9.el8_10 |
| `unbound-libs` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.16.2-5.9.el8_10 |
| `unbound-libs-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.16.2-5.9.el8_10 |
| `python3-unbound` | Red Hat:enterprise_linux:9::appstream | All versions | 0:1.16.2-19.el9_6.1 |
| `python3-unbound-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:1.16.2-19.el9_6.1 |
| `unbound` | Red Hat:enterprise_linux:9::appstream | All versions | 0:1.16.2-19.el9_6.1 |
| `unbound-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:1.16.2-19.el9_6.1 |
| `unbound-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:1.16.2-19.el9_6.1 |

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

Apply the vendor's patch.

## Is CVE-2025-5994 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-5994 is a high-severity vulnerability in NLnet Labs Unbound, published on 16 Jul 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-5994 in the wild and no public exploit code.

Affected product: NLnet Labs Unbound. 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-5994/ (Markdown: https://insights.sbomify.com/CVE-2025-5994/index.md)
```

## Sources

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

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