CVE-2025-59414: Nuxt Path Traversal Vulnerability

LOW
Advisory Identifier: GHSA-p6jq-8vc4-79f6
CVSS 3.1
CWE-22
Published
Advisory Summary

CVE-2025-59414 is a LOW (CVSS 3.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Nuxt libraries in the npm ecosystem. The issue involves nuxt has client-side path traversal in nuxt island payload revival. Remediation is available by upgrading affected packages to version 3.19.0, 4.1.0.

CVE-2025-59414 at a Glance

CVE Identifier CVE-2025-59414
GHSA Identifier GHSA-p6jq-8vc4-79f6
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Nuxt
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2025-59414

To remediate this vulnerability, upgrade all affected Nuxt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nuxt fixed: 3.19.0
npm install nuxt@3.19.0
nuxt fixed: 4.1.0
npm install nuxt@4.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls nuxt

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-59414, inspect your project dependencies using npm:

npm ls nuxt

Analyze the terminal output to locate any version of Nuxt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.19.0), your application is affected.

Note: The npm ls nuxt command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Nuxt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A client-side path traversal vulnerability in Nuxt's Island payload revival mechanism allowed attackers to manipulate client-side requests to different endpoints within the same application domain when specific prerendering conditions are met. ### Technical Details The vulnerability occurs in the client-side payload revival process (revive-payload.client.ts) where Nuxt Islands are automatically fetched when encountering serialized `__nuxt_island` objects. The issue affects the following flow: 1. During prerendering, if an API endpoint returns user-controlled data containing a crafted `__nuxt_island` object 2. This data gets serialized with `devalue.stringify` and stored in the prerendered page 3. When a client navigates to the prerendered page, `devalue.parse` deserializes the payload 4. The Island reviver attempts to fetch `/__nuxt_island/${key}.json` where `key` could contain path traversal sequences ### Prerequisites for Exploitation This vulnerability requires **all** of the following conditions: 1. **Prerendered pages**: The application must use Nuxt's prerendering feature (`nitro.prerender`) 2. **Attacker-controlled API responses**: The attacker must be able to control the response content of an API endpoint that is called during prerendering via `useFetch`, `useAsyncData`, or similar composables 3. **Client-side navigation**: A user must navigate to the prerendered page (not during initial SSR hydration) ### Attack Scenario ```javascript // Malicious API response during prerendering { "__nuxt_island": { "key": "../../../../internal/service", "params": { "action": "probe" } } } ``` This could cause the client to make requests to `/__nuxt_island/../../../../internal/service.json` if path traversal is not properly handled by the server. ### Impact Assessment - **Limited Impact**: The vulnerability has a low severity due to the highly specific prerequisites - **No Direct Data Exfiltration**: The vulnerability does not directly expose sensitive data - **Client-Side Only**: Requests originate from the client, not the server ### Mitigation **Action Required:** - Update to Nuxt 3.19.0+ or 4.1.0+ immediately - Review any prerendered pages that fetch external or user-controlled data **Temporary Workarounds** (if immediate update is not possible): 1. Disable prerendering for pages that fetch user-controlled data 2. Implement strict input validation on API endpoints used during prerendering 3. Use allowlists for API response structures during prerendering ### Fix Details [The fix](https://github.com/nuxt/nuxt/commit/2566d2046bccb158d98fb13e42ce4b2c33fb2595) implemented validation for Island keys in `revive-payload.server.ts`: - Island keys must match the pattern `/^[a-z][a-z\d-]*_[a-z\d]+$/i` - Maximum length of 100 characters - Prevents path traversal and special characters

CVE-2025-59414 Affected Nuxt Versions

2 component(s)
Fixed Versions:
3.19.04.1.0
Product / Package Ecosystem Affected Versions Fixed Version
nuxt
npm
≥ 3.6.0
< 3.19.0
3.19.0
nuxt
npm
≥ 4.0.0
< 4.1.0
4.1.0

References

Frequently Asked Questions

What is CVE-2025-59414?
CVE-2025-59414 is a security vulnerability in Nuxt involving Nuxt has Client-Side Path Traversal in Nuxt Island Payload Revival under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Nuxt versions are affected?
Affected versions include releases prior to 3.19.0, 4.1.0 across affected packages: nuxt.
What version fixes CVE-2025-59414?
Upgrading to 3.19.0, 4.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nuxt affected?
Yes, nuxt is affected in releases prior to 3.19.0, 4.1.0. Upgrade your dependency to 3.19.0, 4.1.0 or later.
What is the CVSS score of CVE-2025-59414?
CVE-2025-59414 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2025-59414?
CVE-2025-59414 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2025-59414?
Run the dependency tree command: 'npm ls nuxt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p6jq-8vc4-79f6",
  "modified" : "2025-09-18T13:04:21Z",
  "published" : "2025-09-17T20:42:28Z",
  "aliases" : [ "CVE-2025-59414" ],
  "summary" : "Nuxt has Client-Side Path Traversal in Nuxt Island Payload Revival",
  "details" : "### Summary\n\nA client-side path traversal vulnerability in Nuxt's Island payload revival mechanism allowed attackers to manipulate client-side requests to different endpoints within the same application domain when specific prerendering conditions are met.\n\n### Technical Details\n\nThe vulnerability occurs in the client-side payload revival process (revive-payload.client.ts) where Nuxt Islands are automatically fetched when encountering serialized `__nuxt_island` objects. The issue affects the following flow:\n\n1. During prerendering, if an API endpoint returns user-controlled data containing a crafted `__nuxt_island` object\n2. This data gets serialized with `devalue.stringify` and stored in the prerendered page\n3. When a client navigates to the prerendered page, `devalue.parse` deserializes the payload\n4. The Island reviver attempts to fetch `/__nuxt_island/${key}.json` where `key` could contain path traversal sequences\n\n### Prerequisites for Exploitation\n\nThis vulnerability requires **all** of the following conditions:\n\n1. **Prerendered pages**: The application must use Nuxt's prerendering feature (`nitro.prerender`)\n2. **Attacker-controlled API responses**: The attacker must be able to control the response content of an API endpoint that is called during prerendering via `useFetch`, `useAsyncData`, or similar composables\n3. **Client-side navigation**: A user must navigate to the prerendered page (not during initial SSR hydration)\n\n### Attack Scenario\n\n```javascript\n// Malicious API response during prerendering\n{\n  \"__nuxt_island\": {\n    \"key\": \"../../../../internal/service\",\n    \"params\": { \"action\": \"probe\" }\n  }\n}\n```\n\nThis could cause the client to make requests to `/__nuxt_island/../../../../internal/service.json` if path traversal is not properly handled by the server.\n\n### Impact Assessment\n\n- **Limited Impact**: The vulnerability has a low severity due to the highly specific prerequisites\n- **No Direct Data Exfiltration**: The vulnerability does not directly expose sensitive data\n- **Client-Side Only**: Requests originate from the client, not the server\n\n### Mitigation\n\n**Action Required:**\n- Update to Nuxt 3.19.0+ or 4.1.0+ immediately\n- Review any prerendered pages that fetch external or user-controlled data\n\n**Temporary Workarounds** (if immediate update is not possible):\n1. Disable prerendering for pages that fetch user-controlled data\n2. Implement strict input validation on API endpoints used during prerendering\n3. Use allowlists for API response structures during prerendering\n\n### Fix Details\n\n[The fix](https://github.com/nuxt/nuxt/commit/2566d2046bccb158d98fb13e42ce4b2c33fb2595) implemented validation for Island keys in `revive-payload.server.ts`:\n- Island keys must match the pattern `/^[a-z][a-z\\d-]*_[a-z\\d]+$/i`\n- Maximum length of 100 characters\n- Prevents path traversal and special characters",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nuxt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.6.0"
      }, {
        "fixed" : "3.19.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nuxt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nuxt/nuxt/security/advisories/GHSA-p6jq-8vc4-79f6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59414"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nuxt/nuxt/commit/2566d2046bccb158d98fb13e42ce4b2c33fb2595"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nuxt/nuxt"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-17T20:42:28Z",
    "nvd_published_at" : "2025-09-17T19:15:47Z"
  }
}