Addressing Node.js Vulnerabilities in Ubuntu

php2shell patches (CVE-2026-109618 and CVE-2026-109619) for EOL PHP are out now. With sales replies slower than usual due to high demand, the fastest route to patched packages is to buy ELS for Runtimes online (opens in new tab). Read the patch FAQ

Go straight to an AI summary of this blog post instead

  • Summarize this post with Perplexity
  • Summarize this post with Gemini

Key Takeaways

  • Node.js vulnerabilities enter through three vectors: the runtime, npm dependencies (including transitive ones), and misconfigured HTTP, TLS, or filesystem APIs.
  • Path traversal, prototype pollution, ReDoS, and HTTP/2 DoS bugs are the vulnerability classes causing real damage in production environments in 2026.
  • Recent security releases patched high-severity issues across active release lines – but fixes.Node.js for 20.x and below are EOL and won’t receive upstream fixes.
  • Detection requires layering npm audit, an SCA scanner, and runtime version checks; no single tool catches everything.

Most Node.js breaches don’t start with a zero-day. They start with a package.json nobody has touched in 14 months, running on an LTS line that quietly went end-of-life. Node.js vulnerabilities are unusually easy to ignore – until a CVE drops in a transitive dependency you didn’t know you had, and suddenly the scanner is yelling at you and you can’t immediately tell what’s actually exposed.

This article covers the actual risks in 2026: what the recent security releases fixed, which vulnerability classes keep showing up in the wild, how to find them in your stack, and the patching practices that hold up under audit pressure.

Why Node.js Applications Are Often Targeted

isual overview of Node.js security attack surfaces including dependencies.

Node.js sits at the intersection of three things attackers love: a massive public package ecosystem, a single-threaded JavaScript event loop that punishes CPU abuse, and a runtime that’s frequently exposed directly to the internet via HTTP servers and APIs. That combination produces a wide attack surface and a very long tail of unpatched deployments.

More specifically:

  • npm is the largest package registry on earth – and the most active target for malicious packages. Sonatype blocked 136,107 open source malware attacks in Q1 2026 alone, with npm accounting for 75% of all new malicious packages detected that quarter.
  • Single-threaded execution means one slow regex or one CPU-bound request can stall the whole process – no other requests get served until it’s done.
  • Long-lived production deployments often run on EOL Node versions because upgrading means testing every dependency for breaking changes, which teams defer indefinitely.
  • Frameworks like Express, Next.js, and NestJS are the public-facing layer for a huge proportion of web APIs, so any flaw in HTTP parsing, headers, or routing is reachable directly from the internet.
  • Transitive dependency depth – a typical Node.js app pulls in hundreds of packages, and most teams audit only the ones they declared themselves. Everything below that is running on trust.

Most Common Node.js Vulnerabilities

These are the categories that show up in CVE reports, scanner output, and post-incident reviews more than any others. Each has a different fix pattern, so recognizing them on sight saves time when a CVE lands.

Prototype Pollution

Prototype pollution lets an attacker inject properties into Object.prototype, which then shows up on every object in the runtime. It usually creeps in through unsanitized merge or clone operations on JSON input – the kind of thing that seems harmless until you realize the property you just set is now readable by completely unrelated code. lodash, minimist, and various config loaders have all shipped CVEs for this. The impact ranges from authentication bypass to arbitrary code execution depending on what downstream code picks up the polluted property.

Path Traversal in File and HTTP APIs

Path traversal keeps appearing on this list because Node.js keeps finding new edge cases. CVE-2025-27210 was an incomplete fix for a Windows-specific bug in path.normalize() and path.join() involving device names like CON, PRN, and AUX – the kind of thing that only manifests on Windows and that almost nobody tests for. CVE-2025-55130, fixed in January 2026, is a related issue: crafted symlink chains can bypass the permission model’s –allow-fs-read and –allow-fs-write restrictions. Any code that accepts a user-supplied file path is in scope.

Regular Expression Denial of Service (ReDoS)

ReDoS is almost a Node.js signature vulnerability. The single-threaded event loop means a slow regex doesn’t just slow one request – it stalls everything until the regex finishes. A crafted input string – often just a few hundred characters with the right backtracking pattern – can be sent by a remote attacker to pin the CPU at 100% and starve every other request.

CVE-2024-21538 in cross-spawn is a good example of how far the blast radius goes. Cross-spawn is a transitive dependency of jest, eslint, webpack, create-react-app, and thousands of other tools – most Node.js projects have it several layers deep without knowing it. A single vulnerability in a package like that affects millions of projects simultaneously.

Supply Chain Attacks via npm

Malicious packages in the npm registry – either published outright or injected via compromised maintainer accounts – are a growing problem. Typosquatting (publishing lodesh hoping someone misses the ‘e’) has been around for years, but the more sophisticated attacks compromise legitimate, widely used packages directly. Once a malicious version is in the registry, any project that uses a version range (^ or ~) instead of a pinned version will pick it up on the next install.

HTTP/2 and TLS Denial-of-Service

The HTTP/2 implementation in Node.js has been a recurring source of DoS vulnerabilities. CVE-2025-59465 is the most recent HTTP/2 Server issue: a malformed HTTP/2 HEADERS frame causes a Denial of Service crash with no authentication required. CVE-2025-59464 involves a memory leak in TLS error handling during client cert processing that builds up until the process runs out of memory. Neither requires sophisticated exploitation; they just require sending the right bytes to an open port.

Node.js Vulnerabilities Fixed in 2026 Security Releases

Node.js shipped two significant security releases in 2026 – January 13 and March 24 – both affecting all active release lines. The March release is particularly telling: one of its high-severity fixes was an incomplete patch from January, meaning the TLS hole wasn’t fully closed the first time around. That’s not unusual in complex runtimes, but it does underscore why staying on the latest point release matters, not just the latest major.

January 13, 2026 Security Release:

CVE

Severity

Affected

What it does

CVE-2026-21636

Medium

v25 (permission model)

UDS connections bypass –allow-net checks, enabling access to privileged local services

CVE-2026-21637

Medium

20.x, 22.x, 24.x, 25.x

TLS PSK/ALPN callbacks throw unhandled exceptions, crashing the server and leaking file descriptors

CVE-2025-55130

High

All active lines

Crafted symlink chains bypass –allow-fs-read / –allow-fs-write restrictions in the permission model

CVE-2025-55131

High

All active lines

Race condition makes Buffer.alloc non-zero-filled, exposing leftover memory

CVE-2025-59465

High

All active lines

Malformed HTTP/2 HEADERS frame crashes the server – no authentication required

CVE-2025-59464

Medium

All active lines

Memory leak in TLS client cert processing leads to remote DoS over time

Patched versions: 20.20.0, 22.22.0, 24.13.0, 25.3.0.

March 24, 2026 Security Release

CVE

Severity

Affected

What it does

CVE-2026-21637

High

20.x, 22.x, 24.x, 25.x

Incomplete fix from January – SNICallback exceptions still bypass TLS error handlers and crash the process

CVE-2026-21710

High

20.x, 22.x, 24.x, 25.x

HTTP request with a __proto__ header name causes uncaught TypeError crash – no authentication required

CVE-2026-21713

Medium

20.x, 22.x, 24.x, 25.x

Non-constant-time HMAC comparison leaks timing data, potential MAC forgery under certain conditions

CVE-2026-21714

Medium

20.x, 22.x, 24.x, 25.x

HTTP/2 WINDOW_UPDATE frames on stream 0 cause memory leak leading to resource exhaustion

CVE-2026-21717

Medium

20.x, 22.x, 24.x, 25.x

Integer-like strings hash predictably in V8 – crafted JSON.parse input can degrade performance significantly

CVE-2026-21711

Medium

v25 (permission model)

UDS server bind/listen works without –allow-net, exposing local IPC endpoints

CVE-2026-21712

Medium

24.x, 25.x

Malformed IDN in url.format() triggers assertion failure and crashes the process

Patched versions: 20.20.2, 22.22.2, 24.14.1, 25.8.2.

Note: Node.js 20.x and below are now EOL — 18.x since April 2025, 20.x since April 30, 2026 — with no upstream patches coming.v24.16.0 The current active LTS is 24.x (latest: v24.16.0).

How to Detect Node.js Vulnerabilities

No single tool catches everything. The gaps between tools are actually where vulnerabilities live longest – something that doesn’t show up in npm audit because it’s not in the advisory database yet, something that shows up in your SCA scanner but not in your runtime version check. The steps below are the minimum baseline.

Infographic illustrating multi-layer vulnerability detection for Node.js apps.

Run npm audit – but don’t stop there

npm audit is free and built in, scanning your npm packages against known Common Vulnerabilities and Exposures (CVE) entries in the advisory database. That said, it’s still the fastest first pass:

npm audit --audit-level=high
npm audit fix

It will miss vulnerabilities in the Node.js runtime itself, in unpublished internal packages, and anything not yet reported to the GitHub Advisory feed. Think of it as the floor, not the ceiling.

Add an SCA Scanner

A Software Composition Analysis tool – Snyk, Trivy, GitHub Dependabot – covers the gaps npm audit leaves: transitive dependencies, license issues, runtime CVEs, and container base images. The 2024 Snyk State of Open Source Security report found that 25% of teams track only direct dependencies and almost 5% track none at all. That’s exactly how transitive vulnerabilities sit unpatched for months. The same report found that organizations investing in supply chain security training dropped from 53% in 2023 to just 35% in 2024 – even as the number of teams having to patch or replace vulnerable packages stayed flat above 40%. Teams are doing less to stay ahead while the problem isn’t getting smaller.

Check Your Node.js Runtime Version

Run node -v against the Node.js release schedule and the latest CVE bulletins. As of May 2026, the current LTS is 24.x, with 22.x still in maintenance LTS. Below 22.x, you’re shipping a vulnerable runtime regardless of how clean your dependency tree looks. This check gets skipped a lot because the runtime feels like infrastructure – something the platform team handles – rather than application code that’s the developer’s responsibility. In practice it’s both.

Generate and Monitor an SBOM

A Software Bill of Materials gives you the full transitive dependency graph in a format you can rescan later without rebuilding from source. Generate one with cyclonedx-npm or syft, store it, and run it against updated CVE feeds weekly. An SBOM is how you catch vulnerabilities that were disclosed after you shipped – without one, you’d have to rebuild from source to find out.

Watch the Node.js Security Mailing List

Subscribe to the nodejs-sec mailing list – it covers all security-related releases across the Node.js Project and the broader GitHub organization maintained by the Node.js team. Pre-release advisories typically land 3–7 days before patches, which is enough lead time to schedule maintenance windows and brief the on-call team. Most engineers find out about Node.js CVEs from their scanner – which is already a day or two behind the advisory feed.

Best Practices to Mitigate Node.js Vulnerabilities

Automate Patching

Manual patch cycles don’t scale. By the time a human has reviewed, tested, and rolled out a fix, the CVE has been public long enough for opportunistic scanning to find it. Snyk’s 2024 report found that 74% of teams set SLA targets of a week or less for high-severity vulnerabilities – yet 52% regularly miss those deadlines anyway. The gap isn’t effort; it’s the sheer volume of things to patch.

Automation is what actually closes that gap: automated dependency updates in CI, automated runtime patching at the infrastructure layer, and automated alerts that route the right CVEs to the right people instead of flooding everyone with scanner noise.

Lock and Pin Your Dependencies

Use package-lock.json (or pnpm-lock.yaml or yarn.lock) and commit it. Then go further: pin direct dependencies to exact versions in package.json, not ranges. The ^ and ~ operators are how a “fix” in a transitive package silently changes your runtime behavior without you doing anything. In CI, run npm ci instead of npm install – it fails the build on any drift between lockfile and manifest, so you catch the problem before it ships.

Stay on Active LTS Releases

The Node.js project follows a predictable LTS schedule: even-numbered releases become LTS, odd-numbered ones don’t. Node.js 20.x reached its end of life on April 30, 2026, and 24.x is the active LTS. Node.js 18.x reached end-of-life in April 2025; 16.x in September 2023. If you’re on either of those, you’re accumulating CVEs with no upstream remediation.

The upgrade path from from 16.x, 18.x, or 20.x to 22.x or 24.x is usually manageable, but it does require testing every dependency. The realistic blocker is usually one or two packages that haven’t kept pace with newer Node APIs – worth identifying and resolving rather than carrying an EOL runtime indefinitely.

Validate All Input at the Boundary

Prototype pollution, path traversal, ReDoS, command injection – they’re all, at root, input validation failures. A schema validator like zod, joi, or ajv at every HTTP boundary catches most of it before it reaches your application logic. Don’t merge user input into objects. Don’t pass user input to exec, eval, Function, or unbounded regex patterns. None of this is glamorous work, but it’s where the actual risk lives.

Run with Least Privilege

Use the Node.js permission model where it’s appropriate (keeping in mind it’s still experimental and has documented gaps). Run containers as non-root. Use read-only filesystems where possible, drop capabilities you don’t need, and treat the permission model as one layer among several rather than as a complete sandbox.

Running EOL Node.js? TuxCare Provides Extended Security Coverage

Timeline chart illustrating Node.js version support lifecycles and ELS coverage.

Not every organization can upgrade on the vendor’s schedule. Node.js 16.x went EOL in September 2023. Node.js 18.x followed in April 2025. For teams that are still running these versions – often because of a specific dependency chain, a compliance requirement, or a migration in progress – the practical problem is clear: CVEs keep accumulating with no upstream patch available.

TuxCare’s Endless Lifecycle Support (ELS) for Node.js addresses this directly. TuxCare backports security patches for Node.js 12, 14, 16, 18, and 20 – delivered to your systems for as long as you need them, without waiting for an upstream release that isn’t coming. This is particularly useful for:

  • Teams mid-migration who need coverage while moving to a supported LTS line
  • Organizations with compliance requirements (PCI DSS, SOC 2, FedRAMP) that treat EOL runtimes as automatic audit findings
  • Infrastructure teams managing large fleets where Node.js upgrades require coordinated testing across dozens of services

ELS patches cover the security CVEs that matter – the kind that show up in your scanner and in compliance reports – without requiring you to move faster than your migration plan allows.

Reduce the Risk of Node.js Vulnerabilities with TuxCare

Node.js vulnerabilities aren’t going to slow down. npm is too large, the runtime is too widely deployed, and the gap between when a CVE is disclosed and when most teams actually patch it remains uncomfortably wide. The teams that manage this well aren’t doing anything exotic – they’ve automated the boring parts, they’re monitoring the right feeds, they know what’s in their dependency tree, and they have a plan for what happens when a release line goes EOL.

Detection and mitigation are both necessary. Detection tells you what’s broken; mitigation is where the actual work happens. Between the two, the biggest lever is usually time-to-patch – shrinking the window between disclosure and deployment is what reduces real-world exposure, not just scanner cleanliness.

For questions about patching strategy or extended support for EOL Node.js versions, talk to a TuxCare security expert.

Summary
Node.js Vulnerabilities: Top Risks & How to Secure Apps In 2026
Article Name
Node.js Vulnerabilities: Top Risks & How to Secure Apps In 2026
Description
Top Node.js vulnerabilities developers face in 2026 and learn proven ways to reduce risk, patch faster, and secure app infrastructure.
Author
Publisher Name
TuxCare
Publisher Logo

Join 4,500+ Linux & Open Source Professionals!

2x a month. No spam.

Table of Contents
Get the open-source security answers you need

Join 4,500+ Linux & Open Source Professionals!

2x a month. No spam.