CVE-2025-31486

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

MEDIUM
5.3
CVSS Score
Published: April 3, 2025 at 06:24 PM UTC
Updated: June 17, 2026 at 09:10 AM UTC
1 product affected across 1 vendorVite

Using vite by vitejs?

Get instant alerts when new vulnerabilities affect vite - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 40%
SSVC
PoC

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.5.12v < 5.4.17v < 6.0.14v < 6.1.4v < 6.2.5
Affected range stops below 4.5.12, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.4.17, so it looks safe — our inference, not a vendor statement
Affected range stops below 6.0.14, so it looks safe — our inference, not a vendor statement
Affected range stops below 6.1.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 6.2.5, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.3MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-200CWE-284

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card