Skip to main content
← All vulnerabilities
CVE-2025-31486GHSA-XCJ6-PQ6G-QJ4X

Vite allows server.fs.deny to be bypassed with .svg or relative paths

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 4.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5
3 proofs of concept on GitHub, 1 Nuclei template
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

Vite is a frontend tooling framework for javascript. The contents of arbitrary files can be returned to the browser. By adding ?.svg with ?.wasm?init or with sec-fetch-dest: script header, the server.fs.deny restriction was able to bypass. This bypass is only possible if the file is smaller than build.assetsInlineLimit (default: 4kB) and when using Vite 6.0+. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. This vulnerability is fixed in 4.5.12, 5.4.17, 6.0.14, 6.1.4, and 6.2.5.

Timeline

  1. CVE published
  2. CISA SSVC assessment

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

  3. Record last updated
  4. EPSS reached 10%

    FIRST estimates at least a 10% chance of exploitation in the next 30 days

Affected versions

  • vitejs vite

    fixed in 4.5.12; From 5.0.0 · fixed in 5.4.17; From 6.0.0 · fixed in 6.0.14; From 6.1.0 · fixed in 6.1.4; From 6.2.0 · fixed in 6.2.5

  • vitenpm

    From 6.2.0 · fixed in 6.2.5

  • vitenpm

    From 6.1.0 · fixed in 6.1.4

  • vitenpm

    From 6.0.0 · fixed in 6.0.14

  • vitenpm

    From 5.0.0 · fixed in 5.4.17

  • vitenpm

    fixed in 4.5.12

References 7

GitHub · vitejs/vite

GitHub · projectdiscovery/nuclei-templates

GitHub · hackmelocal/CVE-2025-31486-Simulation

GitHub · iSee857/CVE-2025-31486-PoC

GitHub · ll104567/CVE-2025-31486