server.fs.deny bypassed when using ?import&raw in vite
Key facts
- Attack vector
- Adjacent network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Information disclosure, Security bypass
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Partial Red Hat: 1 fixed, 2 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-200 and CWE-284.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| vitejs | vite | 5.4.0 to before 5.4.6; 5.3.0 to before 5.3.6; 5.0.0 to before 5.2.14; 4.0.0 to before 4.5.5; before 3.2.11 | 5.4.6, 5.3.6, 5.2.14, 4.5.5, 3.2.11 | Patch available | CNA |
| — | vite (npm) | 5.4.0 to before 5.4.6 | 5.4.6 | Patch available | GHSA-9cwx-2883-4wfx |
| — | vite (npm) | 5.3.0 to before 5.3.6 | 5.3.6 | Patch available | GHSA-9cwx-2883-4wfx |
| — | vite (npm) | 5.2.0 to before 5.2.14 | 5.2.14 | Patch available | GHSA-9cwx-2883-4wfx |
| — | vite (npm) | 4.0.0 to before 4.5.4 | 4.5.4 | Patch available | GHSA-9cwx-2883-4wfx |
| — | vite (npm) | before 3.2.11 | 3.2.11 | Patch available | GHSA-9cwx-2883-4wfx |
| — | vite (npm) | 5.0.0 to before 5.1.8 | 5.1.8 | Patch available | GHSA-9cwx-2883-4wfx |
- vite Vendorvitejs Affected 5.4.0 to before 5.4.6; 5.3.0 to before 5.3.6; 5.0.0 to before 5.2.14; 4.0.0 to before 4.5.5; before 3.2.11 Fixed in 5.4.6, 5.3.6, 5.2.14, 4.5.5, 3.2.11 Patch available CNA
- vite (npm) Vendor— Affected 5.4.0 to before 5.4.6 Fixed in 5.4.6 Patch available GHSA-9cwx-2883-4wfx
- vite (npm) Vendor— Affected 5.3.0 to before 5.3.6 Fixed in 5.3.6 Patch available GHSA-9cwx-2883-4wfx
- vite (npm) Vendor— Affected 5.2.0 to before 5.2.14 Fixed in 5.2.14 Patch available GHSA-9cwx-2883-4wfx
- vite (npm) Vendor— Affected 4.0.0 to before 4.5.4 Fixed in 4.5.4 Patch available GHSA-9cwx-2883-4wfx
- vite (npm) Vendor— Affected before 3.2.11 Fixed in 3.2.11 Patch available GHSA-9cwx-2883-4wfx
- vite (npm) Vendor— Affected 5.0.0 to before 5.1.8 Fixed in 5.1.8 Patch available GHSA-9cwx-2883-4wfx
Remediation
- Fix · CNA vite (vitejs) Fixed in 5.4.6, 5.3.6, 5.2.14, 4.5.5, 3.2.11
- Fix · GHSA-9cwx-2883-4wfx vite (npm) Fixed in 5.4.6 Advisory →
- Fix · GHSA-9cwx-2883-4wfx vite (npm) Fixed in 5.3.6 Advisory →
- Fix · GHSA-9cwx-2883-4wfx vite (npm) Fixed in 5.2.14 Advisory →
- Fix · GHSA-9cwx-2883-4wfx vite (npm) Fixed in 4.5.4 Advisory →
- Fix · GHSA-9cwx-2883-4wfx vite (npm) Fixed in 3.2.11 Advisory →
- Fix · GHSA-9cwx-2883-4wfx vite (npm) Fixed in 5.1.8 Advisory →
Red Hat 2 advisories
- RHSA-2024:10962 Released 2024-12-11 · Red Hat rating ImportantRed Hat OpenShift distributed tracing platform (Jaeger) 3.4 release
- Red Hat OpenShift distributed tracing 3.4 registry.redhat.io/rhosdt/jaeger-query-rhel8
- RHSA-2024:10917 Released 2024-12-10 · Red Hat rating ImportantRed Hat OpenShift distributed tracing platform (Jaeger) 3.4 release
- Red Hat OpenShift distributed tracing 3.4 registry.redhat.io/rhosdt/jaeger-query-rhel8
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet |
| Red Hat OpenShift distributed tracing 3 | Affected | No fix yet |
| Red Hat OpenShift distributed tracing 3.4 | Fixed | RHSA-2024:10917, RHSA-2024:10962 |
Not affected: 4 products
- Red Hat Ansible Automation Platform 2
- Red Hat JBoss Enterprise Application Platform 8
- Red Hat OpenShift distributed tracing 3
- Red Hat OpenShift distributed tracing 3.4
Timeline
- 2026-10-02 Threatist record created from CVE-2024-45811
- 2026-10-03 Alias added: GHSA-9cwx-2883-4wfx
References
Other 7
- https://github.com/vitejs/vite/security/advisories/GHSA-9cwx-2883-4wfx
- https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34
- https://github.com/vitejs/vite/commit/4573a6fd6f1b097fb7296a3e135e0646b996b249
- https://github.com/vitejs/vite/commit/8339d7408668686bae56eaccbfdc7b87612904bd
- https://github.com/vitejs/vite/commit/a6da45082b6e73ddfdcdcc06bb5414f976a388d6
- https://github.com/vitejs/vite/commit/b901438f99e667f76662840826eec91c8ab3b3e7
- https://github.com/vitejs/vite
More vitejs vulnerabilities
- TI-2025-22386 Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query KEVCVSS 3.1HIGH 7.5
- TI-2025-41248 Code injection in vitejs vite-plugin-react CVSS 3.1CRITICAL 9.8
- TI-2026-28350 Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket CVSS 4.0HIGH 8.2
- TI-2025-41735 @vitejs/plugin-rsc has Arbitrary File Read via `/__vite_rsc_findSourceMapURL` Endpoint on Development CVSS 3.1HIGH 7.5
- TI-2025-21544 Vite bypasses server.fs.deny when using `?raw??` CVSS 3.1HIGH 7.5
- TI-2023-16938 Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//) CVSS 3.1HIGH 7.5
Sources
- CVE-2024-45811 · CVE Program
- CVE-2024-45811 · NVD
- FIRST EPSS
- GHSA-9cwx-2883-4wfx · GitHub Advisory Database · CC BY 4.0
- CVE-2024-45811 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences