CVE-2026-21712
npm vulnerability analysis and mitigation

Overview

CVE-2026-21712 is a denial-of-service vulnerability in Node.js URL processing, titled "Assertion error in node_url.cc via malformed URL format leads to Node.js crash." When url.format() is called with a malformed internationalized domain name (IDN) containing invalid characters, an assertion failure occurs in native code (node_url.cc), crashing the Node.js process. It affects Node.js 24.x (fixed in v24.14.1) and 25.x (fixed in v25.8.2). The vulnerability was reported by researcher "wooffie" via HackerOne and disclosed on March 30, 2026, as part of Node.js's March 2026 security release. It carries a CVSS v3.0 base score of 5.7 (Medium) (Node.js Advisory, GitHub Advisory).

Technical details

The root cause is improper input validation (CWE-20) in Node.js's native URL processing code (node_url.cc). When url.format() receives a hostname containing an invalid IDN (internationalized domain name) — such as one with characters that fail IDNA encoding — the underlying native assertion check fails rather than gracefully handling the error, causing an unhandled process crash. Exploitation requires a low-privileged attacker to supply a malformed IDN string to an application that passes user-controlled input to url.format(), and some form of user interaction is required per the CVSS vector. The fix was implemented by maintainer RafaelGSS (Node.js Advisory, GitHub Advisory).

Impact

Successful exploitation results in a complete crash of the affected Node.js process, causing a denial-of-service condition with high availability impact. There is no confidentiality or integrity impact — the vulnerability cannot be used to access or modify data. Any Node.js 24.x or 25.x application that passes user-controlled input to url.format() without prior validation is at risk of being crashed by a low-privileged attacker (Node.js Advisory, GitHub Advisory).

Exploitation steps

  1. Identify a target application: Find a Node.js 24.x or 25.x application that accepts user-controlled input and passes it to url.format() — for example, a URL normalization or redirect service.
  2. Craft a malformed IDN payload: Construct a hostname string containing characters that are invalid under IDNA encoding rules (e.g., characters outside the allowed Unicode ranges or improperly encoded labels), such as xn--�invalid.example.
  3. Submit the payload: Send the malformed hostname as input to the target application endpoint that invokes url.format() with the attacker-controlled value.
  4. Trigger the assertion failure: The native node_url.cc code processes the malformed IDN, hits an internal assertion check, and crashes the Node.js process, resulting in a denial-of-service condition (Node.js Advisory, GitHub Advisory).

Indicators of compromise

  • Logs: Unexpected Node.js process crash logs with assertion failure messages referencing node_url.cc; application logs showing abrupt termination without a graceful shutdown sequence.
  • Process: Node.js process exiting with a non-zero exit code or core dump immediately after processing a URL-related request; process restart loops in process managers (e.g., PM2, systemd) triggered by repeated crashes.
  • Network: Repeated requests to URL-processing endpoints containing unusual or non-ASCII hostname values; requests with hostnames containing percent-encoded or raw invalid Unicode characters in the host field.

Mitigation and workarounds

Upgrade Node.js to the patched versions: v24.14.1 (for 24.x users) or v25.8.2 (for 25.x users), released as part of the March 2026 security update. As a workaround prior to patching, implement input validation to reject or sanitize malformed IDN strings before they are passed to url.format() — for example, using a try/catch around IDNA encoding or validating hostnames against an allowlist of valid characters. IBM API Connect users should consult the IBM advisory for product-specific guidance (Node.js Advisory, IBM Advisory).

Community reactions

The Node.js project disclosed this vulnerability as part of a broader March 2026 security release that addressed nine CVEs across multiple release lines, with community coverage noting the batch nature of the release. Security blogs including HeroDevs and SecPod covered the March 2026 Node.js security release, highlighting the DoS risks. Red Hat, openSUSE, Amazon Linux, and AlmaLinux all issued downstream advisories and errata for their Node.js packages, indicating broad ecosystem uptake of the patch (Node.js Advisory).

Additional resources


SourceThis report was generated using AI

Related npm vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-14257HIGH7.5
  • JavaScript logoJavaScript
  • brace-expansion
NoYesJul 23, 2026
CVE-2026-48815HIGH7.5
  • JavaScript logoJavaScript
  • ubi8::nodejs-22
NoYesJul 14, 2026
CVE-2026-48816MEDIUM6.5
  • JavaScript logoJavaScript
  • litellm-1.83
NoYesJul 14, 2026
CVE-2026-48758MEDIUM5.4
  • JavaScript logoJavaScript
  • graalvm-25
NoYesJul 14, 2026
CVE-2026-59875MEDIUM5.3
  • JavaScript logoJavaScript
  • nodejs22
NoYesJul 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management