Vite's `server.fs.deny` is bypassed when using `?import&raw` (CVE-2024-45811)
A vulnerability in Vite allows bypassing the file system access restrictions when using the '?import&raw' query parameter. This results in the contents of arbitrary files outside the allowed serving list being returned to the browser. The issue affects Vite versions from 2.5.1 up to but not including 5.4.6. A proof of concept demonstrates that files normally blocked by the '@fs' deny list can be accessed by appending '?import&raw' to the URL. The vulnerability has a medium severity with a CVSS score of 5.3.
AI Analysis
Technical Summary
Vite's file system access control mechanism '@fs' is designed to deny access to files outside a configured allow list. However, when a request URL includes the query parameters '?import&raw', this restriction is bypassed, allowing an attacker to retrieve the contents of arbitrary files if they exist on the server. This flaw affects Vite versions >=2.5.1 and <5.4.6. The vulnerability does not require privileges or user interaction and has a CVSS 3.1 base score of 5.3, indicating medium severity. A proof of concept shows that a file such as '/tmp/secret.txt' can be accessed despite the deny list by using the bypass query parameters.
Potential Impact
An attacker can read arbitrary files on the server that are outside the intended allowed file system paths. This can lead to unauthorized disclosure of sensitive information. The vulnerability does not impact integrity or availability, only confidentiality. No known exploits are reported in the wild.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade Vite to version 5.4.6 or later where this issue is fixed. Until patched, avoid exposing Vite development servers to untrusted networks. Review vendor advisories for the official fix and apply it promptly.
Vite's `server.fs.deny` is bypassed when using `?import&raw` (CVE-2024-45811)
Description
A vulnerability in Vite allows bypassing the file system access restrictions when using the '?import&raw' query parameter. This results in the contents of arbitrary files outside the allowed serving list being returned to the browser. The issue affects Vite versions from 2.5.1 up to but not including 5.4.6. A proof of concept demonstrates that files normally blocked by the '@fs' deny list can be accessed by appending '?import&raw' to the URL. The vulnerability has a medium severity with a CVSS score of 5.3.
CVSS v3.1
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Vite's file system access control mechanism '@fs' is designed to deny access to files outside a configured allow list. However, when a request URL includes the query parameters '?import&raw', this restriction is bypassed, allowing an attacker to retrieve the contents of arbitrary files if they exist on the server. This flaw affects Vite versions >=2.5.1 and <5.4.6. The vulnerability does not require privileges or user interaction and has a CVSS 3.1 base score of 5.3, indicating medium severity. A proof of concept shows that a file such as '/tmp/secret.txt' can be accessed despite the deny list by using the bypass query parameters.
Potential Impact
An attacker can read arbitrary files on the server that are outside the intended allowed file system paths. This can lead to unauthorized disclosure of sensitive information. The vulnerability does not impact integrity or availability, only confidentiality. No known exploits are reported in the wild.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade Vite to version 5.4.6 or later where this issue is fixed. Until patched, avoid exposing Vite development servers to untrusted networks. Review vendor advisories for the official fix and apply it promptly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-vite-CVE-2024-45811
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6abb419cf7a7c54106cc387b
Added to database: 09/29/2026, 04:42:04 UTC
Last enriched: 09/29/2026, 04:55:11 UTC
Last updated: 09/29/2026, 18:11:13 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.