Security
Apr 13, 2026

CVE-2026-21717: Node.js HashDoS Vulnerability in V8 Explained and How to Fix It

Understanding the V8 HashDoS vulnerability in Node.js, its impact on EOL runtimes, and practical remediation paths for security and compliance teams.

Give me the TL;DR
CVE-2026-21717: Node.js HashDoS Vulnerability in V8 Explained and How to Fix It
For Qualys admins, NES for .NET directly resolves the EOL/Obsolete Software:   Microsoft .NET Version 6 Detected vulnerability, ensuring your systems remain secure and compliant. Fill out the form to get pricing details and learn more.

A flaw in V8's string hashing mechanism affects every actively maintained Node.js release line, and extends to end-of-life (EOL) versions that will never receive an upstream patch.

CVE-2026-21717 was disclosed on March 30, 2026, as part of the Node.js March 2026 security release batch. It affects Node.js 20.x, 22.x, 24.x, and 25.x, and, by extension, all earlier EOL versions that share the same vulnerable V8 hashing behavior. For teams running Node.js 18.x or earlier, there is no upstream fix and no official patch will be issued. NES for Node.js delivers remediated packages for all affected EOL versions.

What Is CVE-2026-21717?

CVE-2026-21717 is a medium-severity Hash Denial-of-Service (HashDoS) vulnerability rooted in V8's internal string hashing mechanism. V8, the JavaScript engine underlying Node.js, maintains an internal string table that uses hash values to locate and deduplicate strings. The flaw: integer-like strings (strings that look like numbers, such as "0", "1", "42", "1000") are hashed to their numeric value rather than through a randomized hash function.

Because the hash values for these strings are entirely predictable, an attacker can craft input designed to land thousands of strings into the same hash bucket. The result is that V8's internal hash table degrades from O(1) lookups to O(n) traversals, consuming CPU in proportion to the number of crafted collisions. The Node.js process does not crash, but performance degrades significantly and the degradation is entirely attacker-controlled.

CVSS 3.0 Score: 5.9 Medium CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

The vector breaks down as follows:

  • AV:N: Network-accessible. No physical or local access required.
  • AC:H: High attack complexity. The attacker must craft input that specifically triggers the collision pattern.
  • PR:N: No privileges required. Any unauthenticated user who can send input to the affected endpoint can exploit this.
  • UI:N: No user interaction required.
  • C:N / I:N / A:H: No confidentiality or integrity impact. Availability impact is rated High.

The CVSS score is sourced from the HackerOne CNA assignment. Verify the NVD-assigned score at https://nvd.nist.gov/vuln/detail/CVE-2026-21717.

Why This Matters

HashDoS vulnerabilities are operationally deceptive. The application does not throw an error, return a 500, or crash in a way that triggers conventional alerting. It slows down. Under sustained attack, that slowdown can become severe enough to degrade or effectively deny service to legitimate users.

The most common trigger is any endpoint that calls JSON.parse() on attacker-controlled input. JSON parsing internalizes short strings into V8's affected hash table automatically. Any API endpoint that accepts a JSON request body, parses query parameters, or processes user-supplied data is a potential attack surface. That covers the majority of Node.js HTTP services.

For engineering and security teams, the downstream consequences are concrete:

  • Vulnerability scanners flag it. Tools like Snyk, Tenable, and OWASP Dependency-Check identify CVE-2026-21717 against affected Node.js versions. Flagged runtimes create CI/CD pipeline failures, scanner noise, and compliance findings that require documented remediation.
  • Compliance posture degrades. SOC 2, PCI DSS, HIPAA, and FedRAMP assessments treat unpatched runtimes as findings. A known medium-severity CVE on a production runtime is a documented gap that auditors expect to see closed within your SLA window.
  • EOL versions receive no fix. The Node.js project explicitly states that end-of-life release lines are always affected when a security release occurs, and they do not receive patches. If your runtime is EOL, the only path to a resolved CVE is a commercial support provider or an upgrade.

Who Is Affected

CVE-2026-21717 affects all Node.js release lines that share the vulnerable V8 string hashing behavior. The March 2026 security advisory covers actively maintained lines (20.x, 22.x, 24.x, 25.x). EOL versions inherit the same V8 flaw and have no upstream remediation path.

A note on Node.js 20.x: Node.js 20 reaches the end of its Maintenance LTS phase on April 30, 2026. An OSS patch (20.20.2) is available now, but teams should treat Node.js 20 as a short runway, not a long-term destination. Node.js 24 is the current Active LTS and the appropriate target for teams planning migrations.

Node.js 18.x and earlier: Node.js 18 reached end-of-life on April 30, 2025. The Node.js project does not issue security patches for EOL versions. Node.js 16.x, 14.x, and 12.x are in the same position. For organizations running any of these versions, CVE-2026-21717 is present, unpatched by the upstream project, and will remain so. NES for Node.js is the actionable remediation path.

Why Upgrading Is Not Always Immediate

The standard recommendation is to upgrade to a supported Node.js version. For many teams, that recommendation is correct and the right long-term answer. For many others, it is not a short-term option.

Node.js major version upgrades are not always drop-in. Jumping from Node.js 14 or 16 to 22 involves changes to native module compatibility, deprecated APIs, changes in V8 behavior, and potential breakage in dependencies that have not been tested against newer runtime versions. In complex microservices environments or monolithic applications with extensive dependency trees, the testing and validation burden is significant.

Large production systems often accumulate configurations, build pipelines, and deployment processes that assume a specific Node.js version. "Not recommended" does not mean issues are not present in those environments. Teams running Node.js 18 or earlier are frequently doing so because the migration effort has not yet been resourced, not because they are unaware of the risk.

The business reality: pulling engineers off product work to execute a Node.js major version upgrade takes months, not days. When security SLAs require remediation within 30 to 90 days of a finding, a multi-month migration is not a compliant response.

Technical Breakdown

V8's string interning mechanism is designed to avoid storing duplicate string values. When a string is created, V8 hashes it and stores a reference in a global string table. On subsequent uses of the same string value, V8 can return the existing reference rather than allocating new memory.

The bug is in how V8 computes the hash for integer-like strings. Rather than applying a randomized hash function (which would distribute strings unpredictably across buckets), V8 uses the numeric value of the string as its hash directly. A string like "1000" hashes to 1000 (as well as additional low level information). An attacker who knows this can construct a JSON payload with dozens or hundreds of integer-like string keys that all map to the same bucket modulo the table size.

When the hash table is asked to insert or look up these strings, it must walk the entire collision chain for the targeted bucket. A sufficiently large collision chain turns constant-time operations into linear-time operations, consuming CPU proportional to the number of crafted strings.

The fix in Node.js 22.22.2, 24.14.1, 25.8.2, and 20.20.2 changes how V8 hashes integer-like strings so that collisions are no longer predictable from outside the process.

The most vulnerable endpoint pattern is any HTTP handler that calls JSON.parse() on a request body without first validating input structure or size. Rate limiting at the edge does not fully mitigate this; the attack can be effective with a small number of large, crafted payloads.

The HeroDevs Solution

For teams on Node.js 18.x, 16.x, 14.x, or 12.x, the upstream Node.js project offers no patch for CVE-2026-21717. These versions are EOL.

NES for Node.js from HeroDevs is a drop-in remediation for EOL Node.js versions. It resolves CVE-2026-21717 and delivers remediated binaries for every subsequent CVE on the version you are already running. Implementation requires a change to your npm registry configuration and a rebuild, with no code changes to your application.

HeroDevs is a founding member of the OpenJS Foundation's Ecosystem Sustainability Program and is listed on the official Node.js end-of-life page as a commercial support provider. NES for Node.js is designed to satisfy the compliance requirements that drive most remediation timelines, including SOC 2, PCI DSS, HIPAA, and FedRAMP. Scanner integrations and attestation documentation are available to resolve findings in Snyk, Tenable, and equivalent tools.

NES is a viable solution for those looking to remain on older versions. In cases where upgrades are planned as a way to resolve these vulnerabilities, it can be used as a short term bridge . The goal is to give your team the runway to execute a migration on a timeline that reflects your actual engineering capacity, not one dictated by a scanner alert.

How to Fix It

If you are on a supported version (20.x, 22.x, 24.x, 25.x):

Upgrade to the patched release for your line:

Patched releases are available through the standard Node.js distribution channels. No commercial agreement is required.

If you are on Node.js 20.x, note that this release line reaches end of life on April 30, 2026. Upgrading to 20.20.2 resolves CVE-2026-21717, but Node.js 24 (Active LTS) is the appropriate long-term target.

If you are on an EOL version (18.x, 16.x, 14.x, 12.x):

No OSS patch exists. The upstream project will not issue one. Your options are:

  1. Upgrade to a supported Node.js version. This is the right long-term path and should be on your roadmap. For teams that can execute this quickly, it is the preferred resolution.

  2. Deploy NES for Node.js. For teams that cannot complete a major version upgrade within their compliance remediation window, NES delivers a remediated package for your current EOL version. Installation is implemented application wide via simple registry settings. Your application code otherwise  does not require change.

For all versions, consider adding explicit input size limits and structure validation before any JSON.parse() call on attacker-controlled data. This reduces the attack surface for this class of vulnerability regardless of patch status. While this solves a large part of this vulnerability it does not fully resolve the entire issue.

Taking Action

For teams on Node.js 22.x, 24.x, or 25.x: the path is clear. Upgrade to the patched release and close the finding.

For teams on Node.js 20.x: patch now to 20.20.2, and begin planning the migration to Node.js 24 before the April 30, 2026 EOL date.

For teams on Node.js 18.x or earlier: this is exactly the gap NES for Node.js is designed to close. Your scanner is flagging a real vulnerability. Your compliance SLA requires documented remediation. The upstream project has no patch for your version and will not issue one.

NES for Node.js resolves CVE-2026-21717 on EOL versions as a drop-in fix, with no migration required and no application code changes. Your team gets the fix for this CVE and every subsequent CVE on the version you are running today, while you plan the migration on your own timeline.

Learn more about NES for Node.js and get immediate protection for your EOL runtime.

For additional Node.js vulnerability coverage, visit the HeroDevs vulnerability directory. Related CVEs from the March 2026 Node.js security release include CVE-2026-21637 (High, TLS SNI Remote DoS) and CVE-2026-21710 (High, HTTP __proto__ header DoS).

Table of Contents
Author
Ryan Jasinski
Engineering Manager
Open Source Insights Delivered Monthly