Skip to main content
Vulnerability Database/CVE-2025-59414

CVE-2025-59414: Nuxt Framework Path Traversal Vulnerability

CVE-2025-59414 is a client-side path traversal vulnerability in Nuxt framework that allows attackers to manipulate requests to different endpoints. This article covers technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-59414 Overview

CVE-2025-59414 is a client-side path traversal vulnerability in Nuxt, the open-source web development framework for Vue.js. The flaw affects Nuxt versions prior to 3.19.0 and 4.1.0. It resides in the Island payload revival mechanism (revive-payload.client.ts), where serialized __nuxt_island objects are automatically fetched by the client. When prerendering returns user-controlled data, attackers can craft an island key containing traversal sequences. The Island reviver then issues requests to /__nuxt_island/${key}.json, redirecting fetches to arbitrary endpoints within the same application origin. The weakness maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

Critical Impact

Attackers can coerce client-side requests to unintended same-origin endpoints when prerendering conditions permit user-controlled island payloads, enabling limited confidentiality impact against affected Nuxt applications.

Affected Products

  • Nuxt versions prior to 3.19.0
  • Nuxt versions prior to 4.1.0
  • Applications using Nuxt Islands with prerendering of user-controlled data

Discovery Timeline

  • 2025-09-17 - CVE-2025-59414 published to the National Vulnerability Database (NVD)
  • 2026-06-17 - Last updated in the NVD database

Technical Details for CVE-2025-59414

Vulnerability Analysis

The vulnerability is a client-side path traversal within Nuxt's Island payload revival process. Nuxt serializes component state into the prerendered HTML using devalue.stringify. On the client, devalue.parse deserializes the payload and invokes registered revivers. The NuxtIsland reviver constructs a fetch URL as /__nuxt_island/${key}.json without validating that key is a well-formed island identifier.

During prerendering, if an API endpoint echoes user-controlled data into the payload, an attacker-supplied __nuxt_island object persists in the static HTML. When a victim visits the prerendered page, the client issues the attacker-controlled fetch. Because the request stays within the application origin, it carries session cookies and credentials.

Root Cause

The root cause is missing input validation on the island key consumed by the client reviver. The deserializer trusts any string present in the serialized payload and interpolates it directly into a path. Traversal sequences such as .. escape the /__nuxt_island/ namespace and allow redirection to arbitrary same-origin endpoints.

Attack Vector

Exploitation requires a prerendered Nuxt page that embeds user-controlled data within the payload. An attacker submits content containing a crafted __nuxt_island structure. After prerendering, the victim navigates to the page, triggering the client-side fetch to the attacker-chosen endpoint. User interaction is required and attack complexity is high.

typescript
// Security patch: packages/nuxt/src/app/plugins/utils.ts
const VALID_ISLAND_KEY_RE = /^[a-z][a-z\d-]*_[a-z\d]+$/i
/* @__PURE__ */
export function isValidIslandKey (key: string): boolean {
  return typeof key === 'string' && VALID_ISLAND_KEY_RE.test(key) && key.length <= 100
}

// Security patch: packages/nuxt/src/app/plugins/revive-payload.server.ts
// @ts-expect-error Virtual file.
import { componentIslands } from '#build/nuxt.config.mjs'
import { isValidIslandKey } from './utils'

const reducers: [string, (data: any) => any][] = [
  ['NuxtError', data => isNuxtError(data) && data.toJSON()],

Source: GitHub Commit 2566d204. The fix introduces a strict regular expression and length cap for island keys, rejecting any value containing path traversal characters before the reviver issues a fetch.

Detection Methods for CVE-2025-59414

Indicators of Compromise

  • Prerendered HTML containing __nuxt_island objects with key values that include .., /, or URL-encoded traversal sequences.
  • Client-side fetch requests to /__nuxt_island/ paths that resolve outside the expected island namespace.
  • Unexpected same-origin JSON requests originating from Nuxt-generated pages that reference user-submitted content.

Detection Strategies

  • Inspect generated static output for serialized island payloads where key does not match the pattern /^[a-z][a-z\d-]*_[a-z\d]+$/i.
  • Review the running Nuxt version with npm ls nuxt and compare against 3.19.0 and 4.1.0 baselines.
  • Audit API endpoints that feed prerendering pipelines for reflection of untrusted input into payload objects.

Monitoring Recommendations

  • Log and alert on client requests to /__nuxt_island/ paths containing .., encoded slashes, or non-conforming key formats.
  • Monitor web application telemetry for anomalous same-origin fetches originating from static pages.
  • Track dependency updates in CI pipelines to confirm Nuxt is pinned to a fixed release.

How to Mitigate CVE-2025-59414

Immediate Actions Required

  • Upgrade Nuxt to 3.19.0 or 4.1.0 and above across all development, staging, and production environments.
  • Identify prerendered routes that incorporate user-controlled data and temporarily disable or sanitize their inputs.
  • Review deployed static assets for serialized __nuxt_island payloads containing suspicious keys and rebuild if found.

Patch Information

The maintainers fixed the issue in commit 2566d204, published alongside GitHub Security Advisory GHSA-p6jq-8vc4-79f6. The patch introduces isValidIslandKey, which enforces a strict regular expression and a 100-character maximum before any island fetch URL is constructed. Upgrading to Nuxt 3.19.0+ or 4.1.0+ resolves the vulnerability.

Workarounds

  • Validate and sanitize all user-controlled fields before they are embedded in server-rendered or prerendered payloads.
  • Avoid prerendering routes that reflect untrusted input until the Nuxt upgrade is deployed.
  • Add a Content Security Policy that restricts connect-src to known same-origin paths used by legitimate islands.
bash
# Upgrade Nuxt to a patched release
npm install nuxt@^3.19.0
# or for the 4.x line
npm install nuxt@^4.1.0

# Verify the installed version
npm ls nuxt

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.