critical CVSS 9 EPSS 0.37%

CVE-2026-58042·Node.js vulnerability

A flaw in Node.js can cause dns.resolveAny() Aborts the Node.js Process When a DNS Response Contains More Than 256 A Records. Repeated triggering of this condition can lead to denial of service. This vulnerability affects Node.js **26.x**, **24.x**, and **22.x**.

Severity
critical
Software
Node.js
Fixed in
18.20.4+dfsg-1~deb12u3
Published

How likely is exploitation

FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.37% — higher than 29% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.

Read the two together. CVE-2026-58042 scores 9 on CVSS, so a successful attack would be serious — but at 0.37%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.

Affected versions

Until: 18.20.4+dfsg-1~deb12u3

Fixed in: 18.20.4+dfsg-1~deb12u3

How to fix this CVE

Update Node.js to version 18.20.4+dfsg-1~deb12u3 or later to resolve a critical denial-of-service vulnerability in the dns.resolveAny() function. This flaw allows attackers to crash the Node.js process by sending specially crafted DNS responses containing more than 256 A records. Immediate patching is essential for any production systems relying on DNS resolution functionality.

sudo dnf update nodejs

Defensia detects this vulnerability

How to check if you are affected

  1. Check installed Node.js version: node --version or nodejs --version
  2. Verify package version via package manager: apt list --installed | grep nodejs (Debian/Ubuntu) or dnf list installed | grep nodejs (RHEL/CentOS/Amazon Linux)
  3. Search system logs for dns.resolveAny() errors or unexpected process terminations: grep -i 'dns\|resolveAny\|abort' /var/log/syslog /var/log/messages
  4. After patching, confirm the update was applied: nodejs --version and verify it matches 18.20.4 or later

FAQ

What is CVE-2026-58042?

This is a critical denial-of-service vulnerability in Node.js where the dns.resolveAny() function crashes the entire process when processing DNS responses containing more than 256 A records. An attacker can repeatedly trigger this condition to cause persistent service unavailability.

Is CVE-2026-58042 being actively exploited?

No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, the attack is trivial to execute once the vulnerability is known.

What versions of Node.js are affected by CVE-2026-58042?

Node.js versions 26.x, 24.x, and 22.x are confirmed vulnerable. Earlier versions up to 18.20.3 are also affected; the fix is available in 18.20.4+dfsg-1~deb12u3 and later releases.

How do I check if my server is vulnerable to CVE-2026-58042?

Run 'nodejs --version' and compare the output against the patched version 18.20.4+dfsg-1~deb12u3. If your version is earlier than the fixed release, the system is vulnerable.

Does Defensia detect CVE-2026-58042?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Node.js is installed on a monitored server, CVE-2026-58042 will appear in your dashboard with remediation steps.

Related Node.js CVEs

CVE-2026-48930CVSS 10A flaw in Node.js TLS hostname handling can cause Embedded-nul hostnames can lead to silent authority rebinding due to c-string truncation in resolver bindings. This vulnerability affects all supported release lines: **Node.js 22**, **Node.js 24**, and **Node.js 26**.
CVE-2026-21636CVSS 10A flaw in Node.js's permission model allows Unix Domain Socket (UDS) connections to bypass network restrictions when `--permission` is enabled. Even without `--allow-net`, attacker-controlled inputs (such as URLs or socketPath options) can connect to arbitrary local sockets via net, tls, or undici/fetch. This breaks the intended security boundary of the permission model and enables access to privileged local services, potentially leading to privilege escalation, data exposure, or local code execution. * The issue affects users of the Node.js permission model on version v25. In the moment of this vulnerability, network permissions (`--allow-net`) are still in the experimental phase.
CVE-2025-55130CVSS 9.1A flaw in Node.js’s Permissions model allows attackers to bypass `--allow-fs-read` and `--allow-fs-write` restrictions using crafted relative symlink paths. By chaining directories and symlinks, a script granted access only to the current directory can escape the allowed path and read sensitive files. This breaks the expected isolation guarantees and enables arbitrary file read/write, leading to potential system compromise. This vulnerability affects users of the permission model on Node.js v20, v22, v24, and v25.
CVE-2026-48933CVSS 9A flaw in Node.js WebCrypto implementation can crash the process if the input of `subtle.encrypt()` is a multiple of 2GiB. This vulnerability affects all supported release lines: **Node.js 22**, **Node.js 24**, and **Node.js 26**.
CVE-2026-56846CVSS 9A flaw in Node.js HTTP/2 handling can cause HTTP/2 retained header blocks evade maxSessionMemory and enable remote memory exhaustion. This vulnerability affects Node.js **24.x** and **22.x**.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-58042. Free for 1 server.

Get started free