# CVE-2026-18664: Wrong interpretation of ACL ranges

> Attackers can bypass IP-based access controls on NSD DNS servers due to endianness errors in range comparisons, allowing unauthorized access or blocking legitimate users.

- **Severity:** High 8.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Aug 2026
- **Updated:** 26 Aug 2026
- **Also known as:** DEBIAN-CVE-2026-18664, GHSA-fw9f-54cp-j7fc, UBUNTU-CVE-2026-18664

## What is CVE-2026-18664?

CVE-2026-18664 is a high-severity authentication bypass vulnerability in NLnet Labs NSD, published on 26 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

When ranges are used for access control (i.e. of the form 1.2.3.4-1.2.3.25), because NSD wrongly compares the IP address with the range on little endian systems, IPs that were meant to be allowed may be denied, and, IPs that were meant to be denied access could be allowed. An IPv4 address is compared with IPv4 ranges as unsigned 32 bit numbers directly with the endianness of the host, but the values to compare are in network byte order (big-endian).  With IPv6 addresses the comparison is done in 4 times a unsigned 32 bit number comparison, again with the endianness of the host where all values are actually in network bye order.

Weakness: CWE-697 (Incorrect Comparison), CWE-284 (Improper Access Control)

## Which versions are affected by CVE-2026-18664?

It affects 1 product.


Products: Nlnetlabs Nsd.

## How do I fix CVE-2026-18664?

Apply the vendor's patch.

## Is CVE-2026-18664 being exploited?

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

## Other vulnerabilities in NLnet Labs NSD

- [CVE-2026-12244](https://insights.sbomify.com/CVE-2026-12244/): Heap overflow and crash with crafted SVCB RR (high 8.7)
- [CVE-2026-12245](https://insights.sbomify.com/CVE-2026-12245/): Denial of DNS over TLS service by any DoT client (high 8.7)
- [CVE-2026-19401](https://insights.sbomify.com/CVE-2026-19401/): Remote UDP DoS by sending multiple DNS Cookie options (high 8.2)
- [CVE-2026-19538](https://insights.sbomify.com/CVE-2026-19538/): Bypass of BLOCKED ACL items on proxy protocol port over TCP or TLS (high 8.2)
- [CVE-2026-12490](https://insights.sbomify.com/CVE-2026-12490/): Bypass of client certificate verification with transfer over TLS (high 8.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-18664 and fix it if it is affected.

What it is: CVE-2026-18664 is a high-severity authentication bypass vulnerability in NLnet Labs NSD, published on 26 Aug 2026. 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-2026-18664 in the wild and no public exploit code.

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

## Sources

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

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