Vite CVE-2025-62522
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach network-exposed Windows dev server
-
ExploitSend request URL ending in backslash
-
ExecutionBypass server.fs.deny path filter
-
ImpactExfiltrate 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
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
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.
Primary rating from Vendor (github).
CVSS VectorVendor: github
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Unauthenticated remote code execution in SmarterTools SmarterMail lets an attacker upload arbitrary files to any locatio
Windows Win32k fails to properly handle objects in memory, allowing local privilege escalation exploited in the wild in
A privilege escalation vulnerability (CVSS 5.5). Risk factors: actively exploited (KEV-listed), EPSS 94% exploitation pr
Windows Internet Shortcut Files (.url) contain an external control vulnerability (CVE-2025-33053, CVSS 8.8) that enables
Windows SMB contains an improper access control vulnerability (CVE-2025-33073, CVSS 8.8) enabling authenticated attacker
An unrestricted file upload vulnerability exists in MiniWeb HTTP Server <= Build 300 that allows unauthenticated remote
Serviio Media Server versions 1.4 through 1.8 on Windows contain an unauthenticated command injection in the /rest/actio
Mako Server versions 2.5 and 2.6 contain an unauthenticated OS command injection via the tutorial interface at examples/
Command injection in the Windows Shell lets remote, unauthenticated attackers bypass a Windows security feature and then
External control of file name or path in Windows NTLM allows an unauthorized attacker to perform spoofing over a network
Siemens Software Center (all versions) loads dynamic-link libraries from an uncontrolled search path, allowing an authen
Windows CLFS Driver contains an input validation flaw enabling local privilege escalation, yet another CLFS kernel vulne
NVD
CVE.org
EPSS
GitHub
Exploit-DB