Skip to main content

Vite CVE-2025-62522

MEDIUM
Path Traversal (CWE-22)
2025-10-20 security-advisories@github.com
6.0
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach network-exposed Windows dev server
  2. Exploit
    Send request URL ending in backslash
  3. Execution
    Bypass server.fs.deny path filter
  4. Impact
    Exfiltrate denied .env/secret files

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

All of the following must hold: (1) the target runs the Vite dev server (not a production build) on Windows; (2) the dev server is explicitly exposed to the network via the --host flag or the server.host config option (default binding is localhost, which is not exploitable); (3) the requested path matches a server.fs.deny pattern (defaults include .env, .env.*, *.crt, *.pem); and (4) the request URL ends with a backslash (\). No authentication is required (PR:N). Limiting factors: the Windows-only requirement plus the non-default network-exposure requirement exclude typical localhost-only and non-Windows development setups, and impact is confined to reading denied files (information disclosure), not code execution.

Impact

Signals are consistent and point to a genuine but narrowly-scoped medium-severity issue rather than a top-tier emergency. The CVSS 4.0 base score is 6.0 (medium) with AV:N/PR:N (remote, unauthenticated) but AT:P, reflecting that specific attack requirements must hold. EPSS is 1.05% (63rd percentile) - modest and not indicative of imminent mass exploitation. It is NOT on the CISA KEV list, so there is no confirmed active exploitation; however, a working proof-of-concept exists publicly in the GitHub Security Advisory (GHSA-93m4-6634-74q7), so publicly available exploit code exists. From an SSVC perspective: exploitation = public PoC only (not active), the technique is trivially automatable (a single crafted curl request), but technical impact is partial - confidentiality-only information disclosure (VC:H, VI:N, VA:N) with no code execution, integrity, or availability impact. The decisive mitigating factor is the dual precondition: the Vite dev server must be running on Windows AND explicitly exposed to the network (via --host or server.host). This is a non-default, generally discouraged configuration (dev servers are normally bound to localhost), which sharply limits the real-world attack surface. Net assessment: real but low-to-moderate priority - prioritize patching for teams who knowingly expose Windows dev servers, deprioritize for typical localhost-only or non-Windows development. EPSS being low while a PoC exists is consistent with a config-gated issue unlikely to see broad opportunistic scanning.

Exploit ScenarioDerived

A developer runs the Vite dev server on a Windows machine and exposes it to the local network with vite --host. An attacker on the same network sends a crafted request whose URL ends with a backslash (e.g. curl --request-target /.env\ http://devhost:5173), bypassing the server.fs.deny filter and retrieving the project's .env file and its secrets. A working PoC is published in the GHSA advisory, and the low-complexity request is easily automatable.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 1.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 08, 2026

A path traversal flaw in the Vite development server (CWE-22) allows files protected by the server.fs.deny filter - by default .env, .env.*, and *.crt/*.pem files - to be read over HTTP by appending a trailing backslash to the request URL, because Node.js resolves a path such as /foo.png/ to /foo.png and the deny-list glob is evaluated against the un-normalized path. Only Vite dev servers (not production builds) running on Windows AND explicitly exposed to the network via --host or server.host are affected, across the 2.x, 3.x, 4.x, 5.x, 6.x, and 7.x release lines; the vendor advisory includes a public proof-of-concept reproduction using a single crafted curl request, and no CISA KEV listing has been recorded, with EPSS at roughly 1.05% (63rd percentile). Impact is limited to information disclosure (confidentiality high, no integrity or availability effect) and requires a non-default network-exposed Windows deployment, making this a genuine but narrowly scoped medium-severity issue rather than a broad remote compromise.

RemediationAI

Apply the vendor-released patch by upgrading the vite npm package to a fixed version: 7.1.11 (for the 7.1.x line), 7.0.8 (7.0.x), 6.4.1 (6.x), or 5.4.21 (5.x and earlier, including any 2.x/3.x/4.x installation, which has no dedicated back-port). The fix is upstream commit f479cc57c425ed41ceb434fecebd63931b1ed4ed and is documented at https://github.com/vitejs/vite/security/advisories/GHSA-93m4-6634-74q7; verify the resolved version with npm ls vite or by inspecting your lockfile after installation. If immediate patching is not possible, the most effective compensating control is to stop exposing the dev server to the network - remove --host and leave server.host at its default localhost binding, or bind explicitly to 127.0.0.1; the trade-off is that the dev server becomes unreachable from other machines or containers, which breaks LAN device testing and remote QA workflows. Running the same project under WSL2, Linux, or macOS also removes the Windows-specific bypass, at the cost of environment drift between developers. As an interim measure, put a reverse proxy or firewall rule in front of the dev server that rejects or normalizes any request URI ending in a backslash before it reaches Vite - careful, permissive normalization in a proxy (for example decoding %5C to \ after Vite's check) could reintroduce the bypass - and restrict inbound access on the dev-server port to trusted IPs only. Deleting or relocating sensitive .env/key files out of the project root for the duration of development reduces exposure but is easy to forget and can break local builds, so it should be treated only as a stopgap until the pinned upgrade lands. Verifying exploitation attempts is possible by grepping dev-server access logs for request targets ending in \ that reference .env, .crt, or .pem paths, though the fixed versions now return HTTP 403 for those requests on Windows.

Affected Packages

npm vite fix: 5.4.21, 6.4.1, 7.0.8, 7.1.11

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Vite is a JavaScript frontend build tool and dev server written in Node.js. During vite dev, static file requests pass through the server/middlewares/static.ts middleware, which calls an isFileLoadingAllowed-style check before serving a file; that check consults the user-configurable config.fsDenyGlob deny-list (default patterns include .env, .env.*, *.{crt,pem}). The root cause is a path-normalization mismatch: Node's fs.readFile('/foo.png/') happily opens /foo.png because the trailing separator is discarded, but the deny-list glob was applied to the original, un-normalized string including the trailing separator. On POSIX systems a trailing / request generally still resolved through the same code path but the Windows-specific backslash (\) variant was the practical bypass demonstrated by the advisory. Because Windows treats \ as a path separator and normalizes it away, a request for /.env\ (issued with curl --request-target /.env\ ...) reached the file-serving logic with a string whose trailing separator escaped the glob match, so the deny rule never fired and the .env content was returned. The upstream fix (commit f479cc57c425ed41ceb434fecebd63931b1ed4ed) strips a trailing slash from the computed file path before invoking fsDenyGlob, so the deny-list is evaluated against the canonical path. The vulnerability class is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory, i.e., path traversal), here manifesting as a deny-list bypass rather than absolute path escape.

Know when Windows gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 6.0 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

Remote unauthenticated request leaks denied files (C:H, I/A:N), but exploitation requires the dev server exposed to the network and running on Windows, a non-default condition, so AC:H; no user interaction needed.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Vite is a frontend tooling framework for JavaScript. In versions from 2.9.18 to before 3.0.0, 3.2.9 to before 4.0.0, 4.5.3 to before 5.0.0, 5.2.6 to before 5.4.21, 6.0.0 to before 6.4.1, 7.0.0 to before 7.0.8, and 7.1.0 to before 7.1.11, files denied by server.fs.deny were sent if the URL ended with \ when the dev server is running on Windows. Only apps explicitly exposing the Vite dev server to the network and running the dev server on Windows were affected. This issue has been patched in versions 5.4.21, 6.4.1, 7.0.8, and 7.1.11.

Threat Intelligence Overview

EPSS Score
1.1%
Top 37% exploitable
Prevalence
High
extremely popular JavaScript build tool; only the dev-server component is affected
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 1.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

51
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

CVE-2025-52691 CRITICAL POC
10.0 Dec 29

Unauthenticated remote code execution in SmarterTools SmarterMail lets an attacker upload arbitrary files to any locatio

CVE-2019-0803 HIGH POC
7.8 Apr 09

Windows Win32k fails to properly handle objects in memory, allowing local privilege escalation exploited in the wild in

CVE-2020-1472 MEDIUM POC
5.5 Aug 17

A privilege escalation vulnerability (CVSS 5.5). Risk factors: actively exploited (KEV-listed), EPSS 94% exploitation pr

CVE-2025-33053 HIGH POC
8.8 Jun 10

Windows Internet Shortcut Files (.url) contain an external control vulnerability (CVE-2025-33053, CVSS 8.8) that enables

CVE-2025-33073 HIGH POC
8.8 Jun 10

Windows SMB contains an improper access control vulnerability (CVE-2025-33073, CVSS 8.8) enabling authenticated attacker

CVE-2013-10047 CRITICAL POC
9.3 Aug 01

An unrestricted file upload vulnerability exists in MiniWeb HTTP Server <= Build 300 that allows unauthenticated remote

CVE-2025-34101 CRITICAL POC
9.3 Jul 10

Serviio Media Server versions 1.4 through 1.8 on Windows contain an unauthenticated command injection in the /rest/actio

CVE-2025-34095 CRITICAL POC
9.3 Jul 10

Mako Server versions 2.5 and 2.6 contain an unauthenticated OS command injection via the tutorial interface at examples/

CVE-2026-96951 HIGH POC
8.8 Oct 13

Command injection in the Windows Shell lets remote, unauthenticated attackers bypass a Windows security feature and then

CVE-2025-24054 MEDIUM POC
6.5 Mar 11

External control of file name or path in Windows NTLM allows an unauthorized attacker to perform spoofing over a network

CVE-2026-110936 HIGH POC
8.4 Oct 15

Siemens Software Center (all versions) loads dynamic-link libraries from an uncontrolled search path, allowing an authen

CVE-2025-32706 HIGH POC
7.8 May 13

Windows CLFS Driver contains an input validation flaw enabling local privilege escalation, yet another CLFS kernel vulne

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy