---
id: "CVE-2026-105482"
kind: "vulnerability"
aliases: ["CVE-2026-105482"]
title: "Node.js: DNS resolve functions silently truncate hostnames at NUL bytes"
severity: "high"
cvss: 7.4
epss: 0.00366
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["allowlist", "node.js", "poc-public", "runtime", "server-side", "ssrf"]
not_affected_if: ["dns-lookup-only", "no-user-supplied-hostnames"]
published_at: "2026-10-23T17:17:19+00:00"
first_seen_at: "2026-10-23T21:57:34+00:00"
updated_at: "2026-10-25T12:38:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-105482", "first_seen_at": "2026-10-23T21:57:34+00:00"}, {"source": "github-poc", "url": "https://github.com/CompleteTech-LLC/node-cve-2026-105482-check", "first_seen_at": "2026-10-23T23:55:02+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-105482", "first_seen_at": "2026-10-25T12:38:50+00:00"}]
---

# Node.js: DNS resolve functions silently truncate hostnames at NUL bytes

Node.js dns.resolve*() and dns.reverse() cut a hostname at the first NUL byte, so a name like attacker.example\0.trusted.example returns records for attacker.example with no error. An application that validates a hostname and then resolves it with these functions can act on records for a different name than the one it checked.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `node --version` and compare against the fixed releases in the advisory (affected lines are 22.x, 24.x and 26.x)
- Search application code for calls to `dns.resolve`, `dns.resolve4`, `dns.resolve6`, `dns.resolveMx` or `dns.reverse` that take hostnames from user input or from an allowlist check
- unknown whether the sources list the exact patched versions

## Fix

- Upgrade Node.js 22.x, 24.x and 26.x to the patched release listed in the Node.js security advisory (exact version unknown from these sources)
- Until patched, reject hostnames containing a NUL byte (`\0`) before passing them to dns.resolve*() or dns.reverse()

## Timeline

- 2026-10-23T21:57:34+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-105482
- 2026-10-23T23:55:02+00:00 github-poc https://github.com/CompleteTech-LLC/node-cve-2026-105482-check
- 2026-10-25T12:38:50+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-105482

## Documents

- [poc] CompleteTech-LLC/node-cve-2026-105482-check https://github.com/CompleteTech-LLC/node-cve-2026-105482-check

## From the sources

A flaw in Node.js DNS resolution allows hostnames containing a NUL byte to be silently truncated by the dns.resolve*() functions and dns.reverse(). This is an incomplete fix of CVE-2026-48930, which only covered dns.lookup() and the net/tls host options.

Because the name is passed to c-ares as a C string, resolving attacker.example\0.trusted.example queries attacker.example and returns its records without any error. Applications that validate a hostname, for example against a domain allowlist, and then resolve it with dns.resolve*() can act on records for a different name than the one they validated.

This vulnerability affects Node.js 26.x, 24.x, and 22.x.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
