Skip to main content
VulnerabilityPublished Updated

CVE-2025-31486: Vite allows server.fs.deny to be bypassed with .svg or relative paths

Affects viteSource GCVE Database

0
Compare

Not known to be exploited · public detection template (Nuclei) · 40% EPSS · CVSS 5.3 Medium : upgrade to 6.2.5 when convenient.

Data as of 12 Nov 2026, 23:24 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
40.4% chance of exploitation in 30 days – higher than 98% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 6.2.5
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 13 Aug 2026

  2. Weaponized: evidence found.

    Public exploit code: GitHub proofs of concept

  3. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  4. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.

What to do

Upgrade vite to 6.2.5.

Affected software

ProductAffectedFixed in
Homebrewvitepkg:brew/viteOther threatsAffected
  • >=2.5.1 <6.2.5
Fixed in
  • 6.2.5

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available for this vulnerability. Users should upgrade Vite to version 6.2.5 or later where this issue is fixed. Until patched, avoid exposing the Vite development server to untrusted networks by not using the --host option or server.host configuration to bind to public interfaces.

Description

Vite versions from 2.5.1 up to but not including 6.2.5 have a vulnerability that allows arbitrary file contents to be returned to the browser. This occurs when the Vite development server is exposed to the network using the --host option or server.host configuration. The vulnerability involves bypassing the server.fs.deny restriction via requests ending with .svg or using relative paths before normalization. The issue affects files smaller than the default 4kB inline asset limit in Vite 6.0 and later. Exploitation requires network access to the dev server and user interaction (UI:R).

References

Community reviews

Loading reviews…