Skip to content

Vite

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

CVE-2024-45811Published 17 Sep 2024, 20:08 UTC

Real-world risk

1.0/ 10Low

Routine

PreliminaryFrom the CVSS vector only · confidence low

CVSS

4.8

scored by the vendor (CNA), CVSS 3.1

In plain words

No plain-language summary yet. The original description is below.

Original description (from GitHub_M)

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.

Am I affected?

ProductAffected versions (from the sources)Fixed in
ViteUbiquitous>= 5.4.0, < 5.4.6; >= 5.3.0, < 5.3.6; >= 5.0.0, < 5.2.14; >= 4.0.0, < 4.5.5; < 3.2.115.4.6, 5.3.6, 5.2.14, 4.5.5, 3.2.11

What to do

Update to a fixed version: 5.4.6, 5.3.6, 5.2.14, 4.5.5, 3.2.11.

Why this score

FactorValueEvidence×
ImpactMajor data exposureReads secrets, credentials, databases, arbitrary filesFrom the CVSS vector0.80
Attacker positionAdjacentSame Wi-Fi, Bluetooth range or network segmentFrom the CVSS vector0.40
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionRoutineA normal action: open a file, visit a page, click a linkFrom the CVSS vector0.70
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityHardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bugFrom the CVSS vector0.45

Threat level T3: Public proof of concept (× 0.95)

A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit

  • CISA SSVC: proof of concept

EPSS 1.1% chance of exploitation in 30 days (percentile 67), as of 2026-12-02.

The arithmetic
  1. Prerequisites multiplied together0.126
  2. Threat T3: Public proof of concept0.950
  3. 10 × impact 0.8 × prerequisites 0.126 × threat 0.950.958
  4. Rounded to one decimal between 0.1 and 101.0

How the score works

Exploitation and evidence timeline

  1. 17 Sep 2024 Published
  2. 3 Dec 2026 CISA SSVC: proof of concept first seen
  3. 3 Dec 2026 Risk 1.0 (cvss fallback)

Weakness

CWE-200, CWE-284

References

Get alerts for Vite

Free email or text alerts when a vulnerability in Vite reaches risk 8 or higher. Nothing else.