Skip to content
OpenAdvisories
Medium · 5.3 Scanner template Public exploit CVE-2025-30208 EUVD-2025-8079GHSA-x574-m823-4x7w

Vite bypasses server.fs.deny when using `?raw??`

Published Mar 24, 2025 · Updated Mar 24, 2025 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
vitejs vite < 4.5.10, >= 5.0.0, < 5.4.15, >= 6.0.0, < 6.0.12, >= 6.1.0, < 6.1.2, >= 6.2.0, < 6.2.3 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

GitHub 24 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
npm vite >= 6.2.0, < 6.2.3 6.2.3 GHSA-x574-m823-4x7w
npm vite >= 6.1.0, < 6.1.2 6.1.2 GHSA-x574-m823-4x7w
npm vite >= 6.0.0, < 6.0.12 6.0.12 GHSA-x574-m823-4x7w
npm vite >= 5.0.0, < 5.4.15 5.4.15 GHSA-x574-m823-4x7w
npm vite < 4.5.10 4.5.10 GHSA-x574-m823-4x7w

References