CVE-2025-31486: Vite allows server.fs.deny to be bypassed with .svg or relative paths
Affects viteSource GCVE Database
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
- 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:NExploitation evidence
Disclosed: evidence found.
CVE published 13 Aug 2026
Detectable: evidence found.
nuclei template: Vite server.fs.deny Bypass - Local File Inclusion
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
Homebrewvitepkg:brew/viteOther threats | Affected
| Fixed in
|
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
- github.com/vitejs/vite/security/advisories/GHSA-xcj6-pq6g-qj4x (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-31486 (opens in a new tab)
- github.com/vitejs/vite/commit/62d7e81ee189d65899bb65f3263ddbd85247b647 (opens in a new tab)
- github.com/vitejs/vite (opens in a new tab)
- github.com/vitejs/vite/blob/037f801075ec35bb6e52145d659f71a23813c48f/packages/vite/src/node/plugins/asset.ts (opens in a new tab)