GHSA-R9JC-W898-3FV6

Vulnerability from github – Published: 2026-11-16 15:00 – Updated: 2026-11-16 15:00
VLAI
Summary
Nuxt payload URL generation has quadratic cost for repeated slashes in the request path
Details

Summary

Nuxt strips trailing slashes from the request path with a regular expression whose cost grows quadratically with the length of a run of consecutive slashes. A single unauthenticated request with a long run of slashes can occupy the server's event loop for a noticeable time, delaying every other request handled by the same process.

Impact

When a page is rendered with payload extraction (any route covered by an isr, swr or cache route rule), Nuxt builds the _payload.json URL from the raw request path. A path such as /blog/a followed by 16,000 slashes and x, which fits within Node's default header size limit, takes roughly 0.1 to 0.4 seconds of synchronous CPU time per request, depending on hardware. Concurrent requests to the same process wait for it to finish, so a modest request rate can keep a process saturated.

An app is affected if it uses Nuxt 4.6.0 or later with server-side rendering and has a route rule like:

export default defineNuxtConfig({
  routeRules: {
    '/blog/**': { swr: true },
  },
})

The same pattern is also reachable through the opt-in experimental.early404 option, for any request path.

Apps without isr, swr or cache route rules and without experimental.early404 are not affected, nor are fully prerendered or client-only apps. The cost is bounded by the maximum request path length, so a reverse proxy with a smaller header limit reduces it further. There is no confidentiality or integrity impact.

Patches

Fixed in nuxt 4.6.4. Trailing slashes are now removed with a linear scan instead of a regular expression.

Workarounds

Reject request paths containing repeated slashes before they reach the renderer, for example at the reverse proxy or with a server middleware:

// server/middleware/reject-repeated-slashes.ts
export default defineEventHandler((event) => {
  if (event.path.split('?')[0]!.includes('//')) {
    throw createError({ statusCode: 404 })
  }
})

If you use experimental.early404, you can also disable it until you upgrade.

Credits

Thanks to cryptofox9 for reporting this issue.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "nuxt"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.6.0"
            },
            {
              "fixed": "4.6.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-128074"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1333"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-16T15:00:41Z",
    "nvd_published_at": "2026-11-13T18:17:36Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\n\nNuxt strips trailing slashes from the request path with a regular expression whose cost grows quadratically with the length of a run of consecutive slashes. A single unauthenticated request with a long run of slashes can occupy the server\u0027s event loop for a noticeable time, delaying every other request handled by the same process.\n\n### Impact\n\nWhen a page is rendered with payload extraction (any route covered by an `isr`, `swr` or `cache` route rule), Nuxt builds the `_payload.json` URL from the raw request path. A path such as `/blog/a` followed by 16,000 slashes and `x`, which fits within Node\u0027s default header size limit, takes roughly 0.1 to 0.4 seconds of synchronous CPU time per request, depending on hardware. Concurrent requests to the same process wait for it to finish, so a modest request rate can keep a process saturated.\n\nAn app is affected if it uses Nuxt 4.6.0 or later with server-side rendering and has a route rule like:\n\n```ts\nexport default defineNuxtConfig({\n  routeRules: {\n    \u0027/blog/**\u0027: { swr: true },\n  },\n})\n```\n\nThe same pattern is also reachable through the opt-in `experimental.early404` option, for any request path.\n\nApps without `isr`, `swr` or `cache` route rules and without `experimental.early404` are not affected, nor are fully prerendered or client-only apps. The cost is bounded by the maximum request path length, so a reverse proxy with a smaller header limit reduces it further. There is no confidentiality or integrity impact.\n\n### Patches\n\nFixed in `nuxt` 4.6.4. Trailing slashes are now removed with a linear scan instead of a regular expression.\n\n### Workarounds\n\nReject request paths containing repeated slashes before they reach the renderer, for example at the reverse proxy or with a server middleware:\n\n```ts\n// server/middleware/reject-repeated-slashes.ts\nexport default defineEventHandler((event) =\u003e {\n  if (event.path.split(\u0027?\u0027)[0]!.includes(\u0027//\u0027)) {\n    throw createError({ statusCode: 404 })\n  }\n})\n```\n\nIf you use `experimental.early404`, you can also disable it until you upgrade.\n\n### Credits\n\nThanks to cryptofox9 for reporting this issue.",
  "id": "GHSA-r9jc-w898-3fv6",
  "modified": "2026-11-16T15:00:41Z",
  "published": "2026-11-16T15:00:41Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/nuxt/nuxt/security/advisories/GHSA-r9jc-w898-3fv6"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-128074"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nuxt/nuxt/commit/97424dd21c59b60cc7ece28576e15069ca0fdbc4"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nuxt/nuxt"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nuxt/nuxt/releases/tag/v4.6.4"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Nuxt payload URL generation has quadratic cost for repeated slashes in the request path"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…