/

CVE-2026-75604

Severity:

CRITICAL RISK

(9.0)

Path Traversal (CWE-22) in Next.js Windows Cache Storage

CVE-2026-75604

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Sensitive Data Disclosure and Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in Next.js can allow remote requests to escape the intended incremental-cache directory on Windows-hosted servers. An attacker may disclose private build data, including the server-reference-manifest encryption key, and possession of that key could enable remote code execution in the affected application.

Affected context

The issue can arise in Next.js applications using the Pages Router or App Router without Cache Components when hosted on Windows. It involves route processing and incremental-cache path construction that do not consistently treat encoded Windows path separators as delimiters, potentially allowing cache paths to resolve outside their intended root.

Exploit preconditions

  • Attack surface: Remotely accessible Next.js route handling
  • Required access: Ability to send requests to the affected application; authentication requirements depend on deployment and route exposure
  • Trigger point: Processing of route segments that influence incremental-cache file paths
  • Why exploitation is possible: Encoded Windows path separators may be insufficiently escaped before filesystem paths are constructed, allowing resolution beyond the intended cache directory

Why this happens

The underlying bug is improper canonicalization and validation of user-influenced path components on Windows. Route segments containing encoded path separators are not consistently escaped before they participate in incremental-cache path construction, allowing attacker-controlled input to alter the resulting filesystem location. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Sensitive build artifacts may be disclosed
  • Private application configuration or runtime metadata could be exposed
  • The server-reference-manifest encryption key may be revealed
  • An attacker could potentially achieve remote code execution in the application
  • Application integrity and confidentiality may be compromised

General mitigation guidance

Mitigation generally focuses on treating route-derived filesystem components as untrusted and enforcing containment before file access.

Common defensive patterns include:

  • Normalize and validate path components using platform-aware, allowlist-based logic
  • Reject encoded separators and traversal indicators before constructing filesystem paths
  • Resolve candidate paths and verify that they remain beneath the intended cache root
  • Avoid exposing incremental-cache files or build artifacts through request-controlled paths
  • Protect sensitive signing and encryption keys using least-privilege secrets management
  • Run application processes with only the filesystem permissions they require
  • Apply vendor-provided security fixes through the normal dependency maintenance process

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules targeting path joins that combine request-derived values with filesystem locations
  • Code review checks for missing normalization, canonicalization, or cache-root containment validation
  • Tests covering encoded forward and backward separators on Windows-specific execution paths
  • Runtime monitoring for requests containing encoded traversal patterns or unusual cache-file access
  • Policy enforcement that blocks direct exposure of build directories and cache storage
  • Automated dependency and security review tools that flag vulnerable framework versions

Sources

SourceLink
github.comgithub.com/vercel/next.js/commit/968b9fcb26bdeb8e0a861a9df05361474666d51b
github.comgithub.com/vercel/next.js/commit/b0f3460a92b955d3ca41fccff9a525a2b910fbf3
github.comgithub.com/vercel/next.js/releases/tag/v15.5.24
github.comgithub.com/vercel/next.js/releases/tag/v16.3.3
github.comgithub.com/vercel/next.js/security/advisories/GHSA-p293-qw3h-jr36

Frequently asked

questions

It may be remotely exploitable when an affected Windows-hosted Next.js application exposes routes that reach the vulnerable path-construction logic. The precise scope depends on routing, cache behavior, and deployment controls.

Not necessarily. A publicly reachable application may provide the required request surface, although authentication, routing restrictions, and other access controls can limit exposure.

Use the vendor-provided security fixes and ensure that all request-derived path components are normalized, validated, and confined to the intended cache directory.

Treat route segments as untrusted input, test platform-specific path behavior, enforce canonical-path containment checks, restrict cache and build-artifact access, and apply least-privilege filesystem permissions.

Find out what's already
exploitable in your codebase.