Key Takeaway
CVE-2025-30208 is a path traversal vulnerability in Vite's development server that allows unauthenticated remote attackers to read arbitrary files from the host filesystem by crafting a malicious URL query string. Affected versions span Vite 4.x through 6.2.x, with patched releases available across all supported branches. Teams running Vite dev servers with network exposure should patch immediately and rotate any secrets that may have been accessible.
CVE-2025-30208 — Vite Development Server Arbitrary File Disclosure
Affected Product: Vite (vitejs/vite), versions prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10 Vulnerability Type: Path Traversal / Arbitrary File Read Attack Vector: Network (unauthenticated, remote) CVSS v3.1 Score: 7.5 (High)
Technical Description
Vite is a frontend build tool and development server widely used across JavaScript ecosystems, including Vue, React, Svelte, and vanilla JS projects. It is maintained under the vitejs organization on GitHub and has accumulated tens of millions of weekly npm downloads.
CVE-2025-30208 is a path traversal vulnerability present in Vite's built-in development server. The flaw exists in how Vite handles URL query parameters when resolving files to serve. Specifically, an attacker can append a crafted query string — using ?import&raw or similar parameter combinations — to a URL request targeting the Vite dev server. This bypasses the server's intended file-serving restrictions and causes the server to read and return arbitrary files from the host filesystem, including files outside the project root directory.
The root cause lies in insufficient sanitization of URL parameters before they are used in file resolution logic. Vite's dev server is designed to serve only files within the configured project root. However, the vulnerable code path processes certain query parameters in a sequence that allows the path restriction check to be circumvented before the file read occurs.
A proof-of-concept request takes the form:
GET /@fs/etc/passwd?import&raw HTTP/1.1
The @fs prefix is a Vite-specific virtual module prefix intended to allow access to filesystem resources under controlled conditions. Combined with the parameter bypass, this prefix becomes the mechanism for unauthorized file access.
Real-World Impact
This vulnerability directly affects developers running Vite's development server in environments where the server is network-accessible — intentionally or not. The most common exposure scenarios include:
- CI/CD pipelines where the Vite dev server is started as part of a build or test workflow on a shared or cloud-hosted runner
- Docker containers or virtual machines with the Vite dev server bound to
0.0.0.0rather than127.0.0.1 - Remote development environments such as GitHub Codespaces, Gitpod, or similar cloud IDEs where port forwarding may expose the dev server externally
- Internal development networks where lateral movement allows a compromised host to reach another developer's workstation
An unauthenticated attacker with network access to the Vite dev server port (default: 5173) can read arbitrary files readable by the process user. This includes:
- SSH private keys (
~/.ssh/id_rsa) - Environment files (
.env,.env.local) containing API keys, database credentials, and secrets - Application source code and configuration files
- System files such as
/etc/passwdor/etc/shadow(on Linux hosts, depending on process privileges) - Cloud provider credential files (e.g.,
~/.aws/credentials,~/.config/gcloud/)
Vite's dev server is not designed for production use, and its documentation states it should not be used as a production server. However, this does not eliminate risk. Developers routinely run dev servers in shared or semi-public environments, and secrets embedded in .env files are a common target.
No public attribution to a specific threat actor campaign has been confirmed at the time of writing, but the simplicity of exploitation — a single crafted HTTP GET request — makes this vulnerability trivially weaponizable by automated scanners.
Affected Versions
| Vite Version Branch | Patched Version | |---|---| | 6.2.x | 6.2.3 | | 6.1.x | 6.1.2 | | 6.0.x | 6.0.12 | | 5.4.x | 5.4.15 | | 4.5.x | 4.5.10 |
Versions older than the 4.x branch are end-of-life and will not receive patches.
Patching and Mitigation
Primary Remediation: Update Vite to a patched version immediately.
npm update vite
# or
yarn upgrade vite
# or
pnpm update vite
Verify the installed version:
npx vite --version
Immediate Mitigations (if patching is not immediately possible):
-
Restrict network binding. Ensure the Vite dev server binds only to
127.0.0.1(localhost) by settingserver.host: falseorserver.host: '127.0.0.1'invite.config.js. This is the default behavior, but verify it has not been overridden. -
Firewall the dev server port. Block external access to port 5173 (or whatever port the dev server uses) at the network or host firewall level.
-
Audit environment files. Rotate any secrets stored in
.envfiles on systems where the Vite dev server was network-accessible while running a vulnerable version. -
Review CI/CD configurations. Confirm that Vite dev server is not started during CI runs on shared infrastructure with network exposure.
Organizations using Vite as a dependency in larger frameworks — including Nuxt, SvelteKit, Astro, and Remix — should verify that framework-level updates have pulled in the patched Vite version, as transitive dependency updates may not be automatic.
The fix was committed to the vitejs/vite repository and released across all supported branches. Review the official security advisory on GitHub for the canonical patch details and any updates.
Related:
Original Source
SANS ISC
Related Articles
CVE Pending: Critical Vulnerability in Anthropic's Claude Code Discovered Days After Source Code Leak
Adversa AI discovered a critical vulnerability in Anthropic's Claude Code agentic coding assistant within days of Anthropic accidentally leaking the product's source code. Claude Code operates with elevated system privileges in developer environments, making exploitation potentially severe — including credential theft, CI/CD pipeline manipulation, and lateral movement. Organizations should audit deployments, rotate credentials, and apply patches immediately once Anthropic releases a fix.
CVE-2024-6387: OpenSSH regreSSHion RCE Flaw Exposes Millions of Linux Servers to Unauthenticated Root Access
CVE-2024-6387 (regreSSHion) is a signal handler race condition in OpenSSH sshd versions 8.5p1 through 9.7p1 that allows unauthenticated remote code execution as root. Discovered by Qualys, the flaw affects an estimated 700,000 publicly exposed servers. Administrators should upgrade to OpenSSH 9.8p1 immediately or set LoginGraceTime 0 as a temporary workaround.
Apple Expands DarkSword Exploit Kit Mitigations Across Device Fleet After State-Sponsored and Spyware Vendor Abuse
Apple has expanded mitigations against the DarkSword exploit kit to additional devices after the toolkit was used in operations by state-sponsored threat groups and commercial spyware vendors. The expansion follows Apple's standard model of phased protection rollouts across its device ecosystem. All Apple device owners should apply the latest OS updates immediately, and high-risk individuals should enable Lockdown Mode.
CVE-2026-20093: Critical Cisco IMC Authentication Bypass Carries CVSS 9.8
Cisco has patched CVE-2026-20093, a critical authentication bypass vulnerability in the Cisco Integrated Management Controller (IMC) with a CVSS score of 9.8. An unauthenticated remote attacker can exploit the flaw to bypass authentication and gain elevated privileges over affected hardware management interfaces. Administrators should apply Cisco's patch immediately and restrict IMC network access to isolated management VLANs.