Skip to content

Vite

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

CVE-2025-31486Published 3 Apr 2025, 18:24 UTC

Real-world risk

2.5/ 10Low

Routine

PreliminaryFrom the CVSS vector only · confidence low

CVSS

5.3

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 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.

Am I affected?

ProductAffected versions (from the sources)Fixed in
ViteUbiquitous< 4.5.12; >=5.0.0, < 5.4.17; >=6.0.0, < 6.0.14; >=6.1.0, < 6.1.4; >=6.2.0, < 6.2.54.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5

What to do

Update to a fixed version: 4.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5.

Why this score

FactorValueEvidence×
ImpactMajor data exposureReads secrets, credentials, databases, arbitrary filesFrom the CVSS vector0.80
Attacker positionInternetAnyone on the Internet can reach a typical deploymentFrom the CVSS vector1.00
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 T4: Weaponized (× 1.00)

A Metasploit module, a Nuclei template, or a verified Exploit-DB entry

  • Public proof of concept on GitHub
  • Nuclei scanner template (link)
  • Reference tagged as exploit (link)
  • CISA SSVC: proof of concept

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

The arithmetic
  1. Prerequisites multiplied together0.315
  2. Threat T4: Weaponized1.000
  3. 10 × impact 0.8 × prerequisites 0.315 × threat 12.520
  4. Rounded to one decimal between 0.1 and 102.5

How the score works

Exploitation and evidence timeline

  1. 3 Apr 2025 Published
  2. 3 Dec 2026 Public proof of concept on GitHub first seen
  3. 3 Dec 2026 Nuclei scanner template first seen
  4. 3 Dec 2026 Reference tagged as exploit first seen
  5. 3 Dec 2026 CISA SSVC: proof of concept first seen
  6. 3 Dec 2026 Risk 2.5 (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.