A flaw in Node.js DNS resolution allows hostnames containing a NUL byte to be silently truncated by the dns.resolve*() functions and dns.rev
- Published
- Last modified
- Status
- published
- Known exploitation
- Not listed in CISA KEV
- Public exploit
- None on Exploit-DB
Summary
A flaw in the DNS resolution functions of Node.js (the dns.resolve*() family and dns.reverse()) causes hostnames containing a NUL byte to be silently cut short, so lookups return records for a different name than the one requested. Applications that check a hostname against an allowlist and then resolve it with these functions may end up acting on data belonging to an unvalidated domain.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
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.
Affected versions
- nodejs node
From 22.23.3 · through 22.23.3; From 24.22.0 · through 24.22.0; From 26.12.0 · through 26.12.0