Description
A flaw in Node.js TLS hostname verification can cause a server certificate to be validated against a different IP address than the one the client connected to, when the host is a non-canonical IPv4 literal with a leading zero, such as `0127.0.0.1`.

`tls.checkServerIdentity()` normalizes the host following the WHATWG URL rules, which read a leading-zero octet as octal (`0127.0.0.1` becomes `87.0.0.1`), while the connection is made through the operating system resolver, which on some platforms such as macOS reads it as decimal (`127.0.0.1`). A server at the connected address can then be authenticated with a certificate issued for another IP address.

This vulnerability affects Node.js **26.x**, **24.x**, and **22.x**.
Published: 2026-10-23
Score: 7.4 High
EPSS: n/a
KEV: No
Impact: Man-in-the-Middle / Authentication Bypass
Action: Patch
AI Analysis

Impact

Node.js TLS hostname verification logic incorrectly normalizes non‑canonical IPv4 literals that begin with a leading zero. When a client connects to an address such as 0127.0.0.1, the hostname is interpreted as octal by the TLS check, turning it into 87.0.0.1, while the operating system resolver treats the literal as decimal and connects to 127.0.0.1. The server’s certificate is then validated against the wrong IP, enabling an attacker to present a certificate issued for an unrelated address while the client believes it is authenticated. This flaw is a certificate trust validation weakness (CWE‑295) and permits a man‑in‑the‑middle or authentication‑bypass attack against any Node.js server that accepts such IP literals.

Affected Systems

Node.js JavaScript runtime versions 26.x, 24.x, and 22.x are affected. The vulnerability applies to any Node.js application using the default TLS hostname verification hooks, specifically the tls.checkServerIdentity() function.

Risk and Exploitability

The flaw carries a CVSS score of 7.4, indicating a high severity. Although no EPSS score is available, the potential to bypass certificate verification without local code execution makes the target attractive for attackers. The vulnerability is not listed in the CISA KEV catalog, but its impact is independent of platform; it can be triggered on any system that resolves lead‑zero IP literals as decimal, including macOS and potentially other operating systems with similar resolver behavior.

Generated by OpenCVE AI on October 23, 2026 at 17:44 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest Node.js release that contains the host name verification patch.
  • If an upgrade is not immediately possible, disable or replace the default tls.checkServerIdentity() callback with a custom implementation that performs strict decimal IPv4 resolution.
  • As a temporary measure, avoid using IPv4 literals with leading zeros in client connections; opt for quoted numeric names or fully qualified domain names that refer to the intended service.

Generated by OpenCVE AI on October 23, 2026 at 17:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 18:00:00 +0000

Type Values Removed Values Added
Title Node.js TLS Hostname Verification Mismatch for Leading-Zero IPv4 Addresses

Fri, 23 Oct 2026 16:30:00 +0000

Type Values Removed Values Added
Description A flaw in Node.js TLS hostname verification can cause a server certificate to be validated against a different IP address than the one the client connected to, when the host is a non-canonical IPv4 literal with a leading zero, such as `0127.0.0.1`. `tls.checkServerIdentity()` normalizes the host following the WHATWG URL rules, which read a leading-zero octet as octal (`0127.0.0.1` becomes `87.0.0.1`), while the connection is made through the operating system resolver, which on some platforms such as macOS reads it as decimal (`127.0.0.1`). A server at the connected address can then be authenticated with a certificate issued for another IP address. This vulnerability affects Node.js **26.x**, **24.x**, and **22.x**.
Weaknesses CWE-295
References
Metrics cvssV3_0

{'score': 7.4, 'vector': 'CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: hackerone

Published:

Updated: 2026-10-23T16:15:05.850Z

Reserved: 2026-10-06T15:00:00.654Z

Link: CVE-2026-106069

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-23T17:17:19.740

Modified: 2026-10-23T19:42:24.553

Link: CVE-2026-106069

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T17:45:17Z

Weaknesses
  • CWE-295

    Improper Certificate Validation