CVE-2024-45811
server.fs.deny bypassed when using ?import&raw in vite
No known exploitation. EPSS puts it in the 64th percentile. A vendor fix is available.
What to do
The vendor has published a fix. Version details are below where the sources state them.
Steps
Written by AI from the record- Check your Vite version in your project (e.g., run
npm ls viteor reviewpackage.json) and confirm whether your site/dev server is using the affected Vite release. - If you are on an affected version, upgrade Vite to the fixed release: 5.4.6.
- If you can’t upgrade to 5.4.6 immediately, upgrade to a fixed version line you use (5.3.6, 5.2.14, 4.5.4, 3.2.11) as applicable.
- After upgrading, test that requests using
?import&rawno longer return blocked filesystem content from the Vite server.
npm install vite@5.4.6What it is
From the CVE record
Vite a frontend build tooling framework for javascript. In affected versions the contents of arbitrary files can be returned to the browser. `@fs` denies access to files outside of Vite serving allow list. Adding `?import&raw` to the URL bypasses this limitation and returns the file content if it exists. This issue has been patched in versions 5.4.6, 5.3.6, 5.2.14, 4.5.5, and 3.2.11. Users are advised to upgrade. There are no known workarounds for this vulnerability.
In plain language
Written by AI from the recordCVE-2024-45811 lets an attacker trick a victim into opening a Vite server URL (using special query parameters) to read files Vite was supposed to block; typical small businesses should fix this if they run Vite in a way that serves files to users.
In vite, a server-side filesystem access restriction meant to block reading outside the allowed directory can be bypassed when a request uses `?import&raw`, allowing restricted local file contents to be returned to the browser without server-side authorization.
If you're affected
- Local source/config file exposure
- Sensitive data disclosure in responses
- Risk of credential leakage
- Reputation and compliance impact
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
No public exploit or proof of concept found in the sources we track.
- EPSS
1.1% chance of exploitation activity in the next 30 days, which ranks it in the 64th percentile of scored CVEs.
Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.
Lifecycle
6 events over 646 days, from the signal feeds we watch.
- OpenVAS check added
- Patch availablerecord updated
- Publishedweakness classified, att&ck mapped
Affected products
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
Scored 4.8 by NVD.
How it is reached
- Attack Vector AdjacentRequires access to the local network (e.g. same Wi-Fi, Bluetooth)
- Attack Complexity HighRequires specific conditions like a race condition or non-default configuration
- Privileges Required NoneNo authentication required — anyone can exploit this
- User Interaction RequiredA user must click a link, open a file, or perform some action
Scope
- Scope UnchangedImpact is limited to the vulnerable component itself
Impact if exploited
- Confidentiality HighTotal information disclosure — all data in the component is compromised
- Integrity NoneNo integrity impact
- Availability NoneNo availability impact
Weaknesses
ATT&CK techniques
Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.
Sources
References in the record
- github.com/vitejs/vite/security/advisories/GHSA-9cwx-2883-4wfx
- github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34
- nvd.nist.gov/vuln/detail/CVE-2024-45811
And 5 more references. See all after sign-in
In the news
Watch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for Vite, not every advisory.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI