# CVE-2024-45811: Vite server.fs.deny bypass via ?import&raw query parameter

Source: https://junglewise.ai/threats/cve-2024-45811-vite-server-fs-deny-bypass-via-import-raw-query-parameter  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-09-17. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2024-45811 · Severity: low · CVSS 3.1 · Published 2024-09-17

Vite is a popular front-end build tool that includes security controls to restrict which files developers can access during local development. An attacker can bypass these file access restrictions by appending `?import&raw` to a URL, allowing unauthorized reading of sensitive files stored on the development server's filesystem. This could expose secrets, configuration files, or other sensitive data to anyone with network access to the development server.

Technologies: [Vite](https://junglewise.ai/threats/technologies/vite). Vendors: [Vite](https://junglewise.ai/threats/vendors/vite).

## Quick answers

**Is CVE-2024-45811 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-45811 being exploited in the wild.

**How severe is CVE-2024-45811?** Low severity, with a CVSS score of 3.1, published 17 September 2024.

**Which products and versions are affected?** Vite 4.0.0–4.5.3, 5.0.0–5.4.5, and all versions prior to 3.2.11.

**Is there a fix for CVE-2024-45811?** A patch was published on 2024-09-17. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-45811 attacked?** It is attacked over the network.

**Am I affected by CVE-2024-45811?** Check whether you run Vite at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a file access control bypass (CWE-200, CWE-284) affecting Vite's `server.fs.deny` security mechanism. The `@fs` endpoint correctly denies access to files outside the configured allow list; however, appending the `?import&raw` query parameter to such requests bypasses this check and returns the file content as JavaScript. The vulnerability is present in Vite versions 4.0.0–5.4.5 across multiple release branches. No authentication or special privileges are required; the attack is network-accessible. Patches are available in versions 3.2.11, 4.5.4, 5.1.8, 5.2.14, 5.3.6, and 5.4.6.

## Affected products

- Vite Vite 4.0.0–4.5.3, 5.0.0–5.4.5, and all versions prior to 3.2.11

## Identifiers

- CVE-2024-45811
- GHSA-9cwx-2883-4wfx

## Timeline

- 2024-09-17: disclosed
- 2024-09-17: patched

## References

- [https://github.com/vitejs/vite/security/advisories/GHSA-9cwx-2883-4wfx](https://github.com/vitejs/vite/security/advisories/GHSA-9cwx-2883-4wfx)

## Related threats

- [Vite development server file access bypass via query parameters](https://junglewise.ai/threats/cve-2026-118662-vite-is-a-frontend-tooling-framework-for-javascript-from-6-4-4)
- [Vite information disclosure via WebAssembly query parameter](https://junglewise.ai/threats/cve-2026-112947-vite-is-a-frontend-tooling-framework-for-javascript-from-8-2-0)
- [Vite path traversal in transformIndexHtml](https://junglewise.ai/threats/cve-2026-112945-vite-is-a-frontend-tooling-framework-for-javascript-prior-to-6-4)
- [Vitejs launch-editor NTLM hash disclosure via UNC path handling](https://junglewise.ai/threats/cve-2026-53632-vitejs-launch-editor-ntlm-hash-disclosure-via-unc-path-handling)
- [Vite path traversal and sensitive file disclosure on Windows via NTFS ADS](https://junglewise.ai/threats/cve-2026-53571-vite-path-traversal-and-sensitive-file-disclosure-on-windows-via)
