/

CVE-2026-53571

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in Vite Windows Dev Server

CVE-2026-53571

Analyzed

Vulnerability type

Category:

Path Traversal / File Access Control

CWE:

CWE-22, CWE-200

Impact:

Exposure of Sensitive Configuration and Secrets

Severity:

HIGH RISK

(7.5)

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 issue in Vite's Windows development server allows access to files that should be blocked by server.fs.deny, including environment and certificate files.

By abusing NTFS alternate data streams and 8.3 short names, an attacker can bypass path normalization on Windows and retrieve sensitive file contents during development.

Affected context

This vulnerability appears in Vite-based projects when the dev server runs on Windows and relies on server.fs.deny to protect sensitive files.

It is most relevant in local or shared development environments where .env, certificate files, or other secrets are present in the project directory.

The risk increases when the dev server is reachable from untrusted networks or when developers load real credentials or private keys in .env and related files.

Exploit preconditions

  • Attack surface: Vite dev server HTTP interface exposed on Windows hosts.
  • Required access: Ability to send crafted HTTP requests to the dev server (e.g., via browser, network access, or SSR tooling).
  • Trigger point: Requests targeting paths that use NTFS alternate data streams (e.g., ::$DATA) or 8.3 short filenames to reference denied files.
  • Why exploitation is possible: The deny logic checks paths before normalizing Windows-specific forms, so NTFS ADS syntax and short names bypass the intended filters and are resolved by Windows to the underlying sensitive files.

Why this happens

The root cause is a mismatch between Vite's path filtering logic and Windows filesystem semantics.

The dev server implements access controls based on literal path patterns (server.fs.deny) but does not normalize or canonicalize NTFS alternate data stream paths and 8.3 short names before applying these checks.

This aligns with CWE-22: Improper Limitation of a Path to a Restricted Directory and CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where controls assume a simpler path model than the operating system actually provides.

Potential impact

  • Access to .env files that may contain API keys, database credentials, and other secrets.
  • Disclosure of TLS certificate and private key material in files like *.crt and *.pem.
  • Leakage of configuration files that reveal internal service endpoints or debugging flags.
  • Facilitation of further attacks (account takeover, lateral movement, or environment cloning) using exposed secrets.

General mitigation guidance

Effective mitigation focuses on ensuring that path-based access controls operate on canonical, fully normalized paths and do not rely on user-supplied path strings directly.

Common defensive patterns include:

  • Normalizing and resolving all requested paths to absolute, canonical filesystem paths before applying deny/allow checks, including platform-specific forms such as NTFS ADS and 8.3 names.
  • Implementing allowlists rooted in a fixed content directory rather than relying solely on denylists for sensitive filenames.
  • Avoiding storage of real secrets in project directories used by dev servers; use environment-level secret management instead of .env files where feasible.
  • Treating development servers as untrusted boundaries, running them on loopback interfaces by default and restricting external visibility.
  • Applying the principle of least privilege to filesystem access logic, ensuring the server cannot read beyond explicitly permitted directories.

How teams detect issues like this

Detection often involves a mix of code-level and operational checks:

  • Static analysis or manual code review of filesystem access modules to confirm that path normalization precedes any deny/allow filtering and that platform-specific path variants are handled.
  • Security testing and fuzzing of dev server endpoints using crafted paths (ADS syntax, 8.3 names, relative traversals) to verify that sensitive files are consistently blocked.
  • Policy-based checks in CI/CD that disallow reading .env and certificate files through development tooling, or flag patterns where dev servers can access secret-bearing directories.
  • Use of automated review tools that highlight reliance on denylist-based filename filters, prompting a shift toward canonical path comparison and directory-based allowlists.

Sources

SourceLink
github.comgithub.com/vitejs/vite/security/advisories/GHSA-fx2h-pf6j-xcff

Frequently asked

questions

Exploitation is constrained to Windows environments running the Vite dev server, but can be significant if that server is exposed beyond the local developer machine or if sensitive files are present in the project directory.

An attacker needs network or browser access to the Vite dev server endpoint. With that, they can issue crafted requests using NTFS ADS and short-name paths to attempt to retrieve denied files.

The safest pattern is to normalize all requested paths to canonical filesystem paths before evaluating them against allowlists or denylists, and to base access control on directory-rooted allowlists rather than filename-based denylists, especially on platforms with complex path semantics.

Future prevention involves treating path handling as platform-specific security-sensitive code: consistently applying canonicalization, preferring allowlists, minimizing secrets in dev project trees, and including path traversal test cases (ADS, short names, unusual encodings) in automated security testing for development servers and tooling.

Find out what's already
exploitable in your codebase.