# CVE-2025-62522: vite allows server.fs.deny bypass via backslash on Windows

> Attackers can bypass file access restrictions to read denied files on Windows dev servers exposed to the network.

- **Severity:** Medium 6.0 (`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`)
- **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:** Yes
- **Published:** 20 Oct 2025
- **Updated:** 20 Oct 2025
- **Also known as:** CLSA-2026-1779065186, CLSA-2026-1783558962, CLSA-2026-1790458381, CLSA-2026-1791806508, CLSA-2026-1792161447, CLSA-2026-1792161548, CLSA-2026-1792161587, CLSA-2026-1792161688, CLSA-2026-1792161779, CLSA-2026-1792161810, CLSA-2026-1792161850, CLSA-2026-1792161923, GHSA-93m4-6634-74q7, MINI-3mfp-286j-3p52, MINI-mvr8-jj4r-pmpr

## What is CVE-2025-62522?

CVE-2025-62522 is a medium-severity path traversal vulnerability in vitejs vite, published on 20 Oct 2025. 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

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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2025-62522?

14 open source packages ship an affected version, including vite.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `vite` | npm | From 2.9.18 | 5.4.21 |
| `vite` | npm | From 2.9.18 | 5.4.21 |
| `vite` | npm | From 3.2.9 | 5.4.21 |
| `vite` | npm | From 3.2.9 | 5.4.21 |
| `vite` | npm | From 4.5.3 | 5.4.21 |
| `vite` | npm | From 4.5.3 | 5.4.21 |
| `vite` | npm | From 5.2.6 | 5.4.21 |
| `vite` | npm | From 5.2.6 | 5.4.21 |
| `vite` | npm | From 6.0.0 | 6.4.1 |
| `vite` | npm | From 6.0.0 | 6.4.1 |
| `vite` | npm | From 7.0.0 | 7.0.8 |
| `vite` | npm | From 7.0.0 | 7.0.8 |
| `vite` | npm | From 7.1.0 | 7.1.11 |
| `vite` | npm | From 7.1.0 | 7.1.11 |

## How do I fix CVE-2025-62522?

Upgrade vite to a fixed version for your release line: 5.4.21, 6.4.1, 7.0.8 or 7.1.11.

## Is CVE-2025-62522 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62522 exists.

Public exploit code:

- Vite - Information Disclosure (nuclei): http/cves/2025/CVE-2025-62522.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-62522 and fix it if it is affected.

What it is: CVE-2025-62522 is a medium-severity path traversal vulnerability in vitejs vite, published on 20 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62522 exists.

Affected packages and fixed versions:
- vite (npm): affected from 2.9.18; fixed in 5.4.21
- vite (npm): affected from 2.9.18; fixed in 5.4.21
- vite (npm): affected from 3.2.9; fixed in 5.4.21
- vite (npm): affected from 3.2.9; fixed in 5.4.21
- vite (npm): affected from 4.5.3; fixed in 5.4.21
- vite (npm): affected from 4.5.3; fixed in 5.4.21
- vite (npm): affected from 5.2.6; fixed in 5.4.21
- vite (npm): affected from 5.2.6; fixed in 5.4.21
- vite (npm): affected from 6.0.0; fixed in 6.4.1
- vite (npm): affected from 6.0.0; fixed in 6.4.1
- vite (npm): affected from 7.0.0; fixed in 7.0.8
- vite (npm): affected from 7.0.0; fixed in 7.0.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-62522/ (Markdown: https://insights.sbomify.com/CVE-2025-62522/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-62522
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-62522
- OSV: https://osv.dev/vulnerability/CVE-2025-62522

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-62522/
Summaries are generated and may contain mistakes; the official description above is the record.
