CVE-2026-106069: Node.js TLS certificate hostname bypass when the host loosely resolves to an IP address
CVE-2026-106069 is a High-severity Node.js TLS flaw: when a connection used a host written in a loose, non-canonical numeric form, Node.js checked the certificate against one interpretation of that host while the system resolver connected to another. A certificate could then be accepted for an endpoint it does not cover. Update to Node.js 22.23.4, 24.22.1 or 26.12.1.
Published Oct 21, 2026 · Analysis Oct 21, 2026
What an attacker can do
When Node.js opens a TLS connection, tls.checkServerIdentity() compares the host you asked for with the names and IP addresses in the server certificate. Hosts can be written in many numeric forms that operating systems still accept: shortened IPv4 such as 127.1, hexadecimal or octal parts, or a single decimal number. Before this fix, Node.js normalized such a host with domainToASCII() and matched the normalized form, but the platform resolver could read the original string as a different address. The check and the connection disagreed about where the client was going.
The practical precondition is that an attacker can choose or influence the host string your client connects to, and can present a certificate that matches the form Node.js checked. That is most realistic in internal networks, private PKI and mutual TLS, in SSRF-style features that connect to user-supplied addresses, and in clients that talk to IP-addressed services such as local model servers or service mesh endpoints. The result is a man-in-the-middle position on a connection the code believes is verified. The fix in lib/tls.js rejects hosts that only become IP addresses after normalization, so ambiguous forms fail instead of passing.
Who is affected
Affected: Node.js 22.x before 22.23.4, 24.x before 24.22.1 and 26.x before 26.12.1. The same commit also fixes a related medium-severity advisory about DNS SANs authenticating IP endpoints. Code at risk uses tls.connect(), https.request(), fetch() or any library on top of them with a host taken from input or configuration.
node -v
npx --yes envinfo --binaries 2>/dev/null | grep -i node
docker run --rm <your-image> node -vSearch for TLS clients that connect to hosts users can set, and for custom checkServerIdentity callbacks that call the default one.
How to fix it
Upgrade to Node.js 22.23.4, 24.22.1 or 26.12.1. After upgrading, connections to non-canonical numeric hosts fail instead of being checked loosely; fix any configuration that relied on forms like 127.1 by writing the address in canonical dotted form.
Until you upgrade, normalize and validate hosts yourself before connecting: parse with new URL(), reject numeric hosts that are not canonical IPv4 or IPv6, and connect to the canonical value.
How to tell if you were hit
Review configuration and logs for TLS connections to hosts written in hex (0x), octal (leading zeros), shortened or single-number IPv4 forms. Certificate errors that start appearing after the upgrade point to callers that used such forms; check whether any of them came from user input. In internal PKI, look for certificates whose DNS names are numeric strings, which have no legitimate use.
Original advisory
From the National Vulnerability Database. This product uses the NVD API but is not endorsed or certified by the NVD.
Node.js TLS identity checks normalized non-canonical numeric hosts before matching them against the certificate, while platform resolvers could interpret the original host as a different address. The fix rejects hosts that become IP addresses only after domainToASCII() normalization. Affected: Node.js 22.x before 22.23.4, 24.x before 24.22.1 and 26.x before 26.12.1. Fixed in Node.js 22.23.4, 24.22.1 and 26.12.1, released October 21, 2026.
Credited to anagnorisis2peripeteia.
Questions
- What is a non-canonical IP address?
It is an address written in a form other than the standard dotted quad, such as 127.1, 0x7f000001 or 2130706433. Most resolvers still accept these forms, which is why a check and a connection can read them differently.
- Does CVE-2026-106069 let attackers break HTTPS to normal websites?
Not by itself. Public CAs do not issue certificates for numeric DNS names, and normal domain names are not affected. The risk is in clients that connect to IP-addressed or user-supplied hosts, and in private PKI or mutual TLS setups.
- Is Node.js 20 fixed for this TLS hostname bug?
No. Node.js 20.x is end of life and the October 21, 2026 releases cover only 22.x, 24.x and 26.x. Move to a supported line.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
Coverage on the Beam blog
More Node.js vulnerabilities
All Node.js entriesCVE-2026-105481
Node.js keep-alive socket processes a response that was written before the request was sent
mediumOct 21, 2026CVE-2026-105482
Node.js dns.resolve truncates names containing NUL char
highOct 21, 2026CVE-2026-105483
Node.js TLS certificate hostname bypass when the IP is written fullwidth digits
highOct 21, 2026CVE-2026-106070
Node.js ZipFile returns attacker-controlled prefix bytes after failed ZIP header validation
lowOct 21, 2026CVE-2026-106071
Node.js Permission Model filesystem over-grant via wildcard radix lookup
lowOct 21, 2026CVE-2026-106072
Node.js improper certificate validation for non-canonical IPv4 hostnames allows DNS SANs to authenticate IP endpoints
mediumOct 21, 2026
