Patchfirst
CVE-2024-45811 Medium · 4.8 EPSS 1.1%

server.fs.deny bypassed when using ?import&raw in vite

vitejs · vite

Official description · CVE.org

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.

Breakdown
63.1 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 24 months after disclosure.

  1. Disclosedday 0
  2. First seen exploitedVulnCheck KEV evidence+24 mo

See the family tree

9 related vulnerabilities in the same code over 2 years. The latest fix listed for vite is 6.0.9.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2024-31207Vite's `server.fs.deny` did not deny requests for patterns with…4 Apr 2024
  2. relatedHigh

    Why these are linked:

    This CVECVE-2024-45811server.fs.deny bypassed when using ?import&raw in vite17 Sep 2024
  3. relatedMedium

    Why these are linked:

    CVE-2025-30208Vite bypasses server.fs.deny when using `?raw??`24 Mar 2025
  4. relatedHigh

    Why these are linked:

    • Fixed one release later6.2.3 → 6.2.4 (vite)
    • Fixed one release later4.5.10 → 4.5.11 (vite)
    • Same code patched: transform.ts, index.html (machine-matched)Functions: transformMiddlewarecommit 315695ecommit 80381c3commit 5967313
    • Similar weakness in the same product (machine-matched)same package + description similarity
    CVE-2025-31125Vite Vitejs Improper Access Control31 Mar 2025KEV
  5. relatedMedium

    Why these are linked:

    CVE-2026-39364Vite has a `server.fs.deny` bypass with queries7 Apr 2026
  6. relatedMedium

    Why these are linked:

    CVE-2026-39365Vite has a Path Traversal in Optimized Deps `.map` Handling7 Apr 2026

3 more CVEs are in this family. See the family tree

Fixes in vitenpm package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 5.0.5CVE-2023-492934 Dec 2023
  2. 5.0.12CVE-2024-2333119 Jan 2024
  3. 5.2.6CVE-2024-312074 Apr 2024
  4. 5.4.6CVE-2024-4581117 Sep 2024
  5. 5.4.6CVE-2024-4581217 Sep 2024
  6. 5.4.9CVE-2024-520111 Jun 2026
  7. 6.0.9CVE-2025-2401020 Jan 2025Latest listed

techniques

No techniques linked

No ATT&CK techniques are linked to this CVE yet. MITRE CTID has not mapped it, and no report passage in the corpus ties it to a technique.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: vite.

Upgrade to 5.4.16

Fixes this CVE and 2 other known vulnerabilities in this package (CVE-2025-30208, CVE-2025-31125).

Still affected on this line by CVE-2026-39365 (fixed in 6.4.2, a newer line).

npmnpm install vite@5.4.16

First fixed in 5.4.6 for CVE-2024-45811.

Affected versions, by release line

If you runUpgrade to
5.4.0 up to 5.4.65.4.16first fix for this CVE: 5.4.6
5.3.0 up to 5.3.6

Still affected on this line by CVE-2025-30208 (fixed in 5.4.15, a newer line); CVE-2025-31125 (fixed in 5.4.16, a newer line); CVE-2026-39365 (fixed in 6.4.2, a newer line).

5.3.6
5.2.0 up to 5.2.14

Still affected on this line by CVE-2025-30208 (fixed in 5.4.15, a newer line); CVE-2025-31125 (fixed in 5.4.16, a newer line); CVE-2026-39365 (fixed in 6.4.2, a newer line).

5.2.14
5.0.0 up to 5.1.8

Still affected on this line by CVE-2025-30208 (fixed in 5.4.15, a newer line); CVE-2025-31125 (fixed in 5.4.16, a newer line); CVE-2026-39365 (fixed in 6.4.2, a newer line).

5.1.8
4.0.0 up to 4.5.4

Still affected on this line by CVE-2026-39365 (fixed in 6.4.2, a newer line).

4.5.11first fix for this CVE: 4.5.4
All versions before 3.2.11

Still affected on this line by CVE-2025-30208 (fixed in 4.5.10, a newer line); CVE-2025-31125 (fixed in 4.5.11, a newer line); CVE-2026-39365 (fixed in 6.4.2, a newer line).

3.2.11

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 4 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

2 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close