Skip to main content
← All vulnerabilities
CVE-2024-45811GHSA-9CWX-2883-4WFX

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 5.4.6, 5.3.6, 5.2.14, 4.5.5, 3.2.11, and 2 more
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • vitejs vite

    From 5.4.0 · fixed in 5.4.6; From 5.3.0 · fixed in 5.3.6; From 5.0.0 · fixed in 5.2.14; From 4.0.0 · fixed in 4.5.5; fixed in 3.2.11

  • vitenpm

    From 5.4.0 · fixed in 5.4.6

  • vitenpm

    From 5.3.0 · fixed in 5.3.6

  • vitenpm

    From 5.2.0 · fixed in 5.2.14

  • vitenpm

    From 4.0.0 · fixed in 4.5.4

  • vitenpm

    fixed in 3.2.11

  • vitenpm

    From 5.0.0 · fixed in 5.1.8

References 2

GitHub · vitejs/vite