A flaw in Node.js TLS hostname verification allows a certificate with only a DNS SAN to authenticate an IP endpoint when the client connects
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Node.js (versions 22.x, 24.x, and 26.x) is affected through its TLS hostname verification in `tls.checkServerIdentity()`, which can wrongly accept a certificate containing only a numeric DNS name as valid for an IP address written in an unusual format. This could allow a client to be tricked into trusting a server it should reject, potentially enabling man-in-the-middle attacks.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
A flaw in Node.js TLS hostname verification allows a certificate with only a DNS SAN to authenticate an IP endpoint when the client connects using a non-canonical IPv4 spelling, such as `0177.0.0.1`, `0x7f.0.0.1`, `2130706433` or `127.1`. `tls.checkServerIdentity()` did not classify these hosts as IP addresses, but normalized them to their canonical form and matched the result against the certificate DNS names. A certificate containing `DNS:127.0.0.1` and no `IP Address:127.0.0.1` SAN was therefore accepted, while the same certificate is correctly rejected for `127.0.0.1`. Exploitation requires a certificate with a numeric DNS SAN issued by a CA trusted by the client, and a platform resolver that accepts these spellings, such as glibc. This vulnerability affects Node.js 26.x, 24.x, and 22.x.
Timeline
- CVE published
- First seen by cve.now
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