Dev.to Security 🔐 Cybersecurity 👁 0 📖 4 min read

CVE-2026-128074: CVE-2026-128074: Regular Expression Denial of Service in Nuxt SSR Payload URL Generation

CVE-2026-128074: Regular Expression Denial of Service in Nuxt SSR Payload URL Generation Vulnerability ID: CVE-2026-128074 CVSS Score: 6.9 Published: 2026-11-16 CVE-2026-128074 is an algorithmic complexity and Regul

CVE-2026-128074: Regular Expression Denial of Service in Nuxt SSR Payload URL Generation

Vulnerability ID: CVE-2026-128074
CVSS Score: 6.9
Published: 2026-11-16

CVE-2026-128074 is an algorithmic complexity and Regular Expression Denial of Service (ReDoS) vulnerability in Nuxt versions 4.6.0 through 4.6.3. The flaw resides in the server-side rendering (SSR) runtime components responsible for payload URL generation and experimental early 404 route evaluation. By sending unauthenticated HTTP requests containing long sequences of repeated forward slashes followed by a non-slash character, an attacker can force the V8 regular expression engine into quadratic O(N^2) backtracking, blocking the single-threaded Node.js event loop and degrading application availability.

TL;DR

Unanchored regular expressions used to strip trailing slashes in Nuxt 4.6.0–4.6.3 exhibit quadratic time complexity when processing paths with repeated slashes and a non-slash suffix. Unauthenticated remote attackers can exploit this flaw to block the Node.js event loop and cause a denial of service on SSR endpoints.

⚠️ Exploit Status: POC

Technical Details

  • CVE ID: CVE-2026-128074 (GHSA-r9jc-w898-3fv6)
  • Weakness Class: CWE-1333: Inefficient Regular Expression Complexity
  • CVSS v4.0 Score: 6.9 Medium (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N)
  • Attack Vector: Network (Unauthenticated HTTP GET Request)
  • Affected Versions: Nuxt >= 4.6.0, < 4.6.4
  • Patched Version: Nuxt 4.6.4
  • EPSS Score: 0.291% (22nd Percentile)
  • CISA KEV Status: Not Listed

Affected Systems

  • Nuxt SSR applications (versions 4.6.0 through 4.6.3) using isr, swr, or cache route rules
  • Nuxt SSR applications (versions 4.6.0 through 4.6.3) with experimental.early404 enabled
  • nuxt: >= 4.6.0, < 4.6.4 (Fixed in: 4.6.4)

Code Analysis

Commit: 97424dd

fix(nuxt): strip trailing slashes in linear time

diff --git a/packages/nuxt/src/runtime/server/renderer/early-404.ts b/packages/nuxt/src/runtime/server/renderer/early-404.ts
index eb86f4a..7090885 100644
--- a/packages/nuxt/src/runtime/server/renderer/early-404.ts
+++ b/packages/nuxt/src/runtime/server/renderer/early-404.ts
@@ -1,7 +1,7 @@
 import { NUXT_PAGE_MATCHER } from 'nuxt/internal/renderer-config'
 import type { NuxtRendererOptions, RendererEvent } from './runtime'
+import { withoutTrailingSlashes } from './url'

-const TRAILING_SLASHES_RE = /\/+$/
 const PAYLOAD_SUFFIX = '/_payload.json'

 /**
@@ -17,7 +17,7 @@ function matchesPageRoute (pathname: string): boolean {
     path = path.slice(0, -PAYLOAD_SUFFIX.length) || '/'
   }
   if (path.length > 1) {
-    path = path.replace(TRAILING_SLASHES_RE, '') || '/'
+    path = withoutTrailingSlashes(path) || '/'
   }
   if (path.includes('%')) {
     try {
diff --git a/packages/nuxt/src/runtime/server/renderer/url.ts b/packages/nuxt/src/runtime/server/renderer/url.ts
index e999fc9..305df7c 100644
--- a/packages/nuxt/src/runtime/server/renderer/url.ts
+++ b/packages/nuxt/src/runtime/server/renderer/url.ts
@@ -23,13 +23,21 @@ export function payloadRequestToRoute (path: string, filename = '_payload.json')
 }

 const LEADING_SLASHES_RE = /^\/+
-const TRAILING_SLASHES_RE = /\/*$/
+
+/** Strip every trailing `/` from a path. */
+export function withoutTrailingSlashes (path: string): string {
+  let end = path.length
+  while (end > 0 && path[end - 1] === '/') {
+    end--
+  }
+  return path.slice(0, end)
+}

 /** The same-origin `_payload.json` (or `_payload.js`) URL for a page route, tagged with the build id. */
 export function routeToPayloadURL (baseURL: string, path: string, buildId: string, filename = '_payload.json'): string {
   const request = parseRequestPath(path)
-  const base = new URL(baseURL.replace(TRAILING_SLASHES_RE, '/'), 'http://localhost')
-  const route = request.pathname.replace(LEADING_SLASHES_RE, '').replace(TRAILING_SLASHES_RE, '/')
+  const base = new URL(withoutTrailingSlashes(baseURL) + '/', 'http://localhost')
+  const route = withoutTrailingSlashes(request.pathname.replace(LEADING_SLASHES_RE, '')) + '/'
   const url = new URL('./' + (route === '/' ? '' : route) + filename, base)
   url.search = request.search
   url.searchParams.set(PAYLOAD_BUILD_ID_PARAM, buildId)

Exploit Details

  • GitHub: Official patch commit containing regression tests demonstrating the 200,000-slash ReDoS trigger pattern.

Mitigation Strategies

  • Upgrade Nuxt to version 4.6.4 or later to replace quadratic regular expressions with linear-time string scanning.
  • Enable URI slash normalization at the reverse proxy or CDN edge (e.g., NGINX merge_slashes on;) to collapse consecutive slashes before requests reach the Node.js server.
  • Implement WAF rules to block HTTP requests containing excessive consecutive forward slashes (e.g., 10 or more consecutive slashes) in the request URI.
  • Disable the experimental early404 feature in nuxt.config.ts if enabled.
  • Enforce strict HTTP header and URI length limits on the edge proxy and Node.js runtime (--max-http-header-size).

Remediation Steps:

  1. Audit package.json and lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock) to identify Nuxt versions between 4.6.0 and 4.6.3.
  2. Update the nuxt dependency to >= 4.6.4 using npm, pnpm, or yarn.
  3. Rebuild and redeploy the SSR application to production environments.
  4. Verify reverse proxy configurations to ensure consecutive slashes in request URIs are merged or rejected.

References

Read the full report for CVE-2026-128074 on our website for more details including interactive diagrams and full exploit analysis.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.