CVE-2022-35204 Vite before v2.9.13 vulnerable to directory traversal via crafted URL to victim's service
Attackers can read arbitrary files from the victim's system via directory traversal in the Vite development server.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-35204?
CVE-2022-35204 is a medium-severity path traversal vulnerability in n/a, published on 18 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Vitejs Vite before v2.9.13 was discovered to allow attackers to perform a directory traversal via a crafted URL to the victim's service.
Weakness: CWE-22
Which versions are affected by CVE-2022-35204?
4 open source packages ship an affected version, including vite. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vite npm | All versions | 2.9.13 |
vite npm | All versions | 2.9.13 |
vite npm | From 3.0.0-alpha.0 | 3.0.0-beta.4 |
vite npm | From 3.0.0-alpha.0 | 3.0.0-beta.4 |
Products include Vitejs Vite.
How do I fix CVE-2022-35204?
Upgrade vite to a fixed version for your release line: 2.9.13 or 3.0.0-beta.4.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2022-35204 being exploited?
There is no known exploitation of CVE-2022-35204 in the wild and no public exploit code.
Other vulnerabilities in n/a
- CVE-2025-31125 Vite Vitejs Improper Access Control
- CVE-2026-53571 Vite: `server.fs.deny` bypass on Windows alternate paths
- CVE-2026-39363 Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket
- CVE-2026-39364 Vite has a `server.fs.deny` bypass with queries
- CVE-2024-23331 Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem
Sources
Also known as GHSA-mv48-hcvh-8jj8.