CVE-2025-31486
April 03, 2025
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 Packages
https://github.com/vitejs/vite.git (GITHUB):
Affected version(s) >=v2.0.0-alpha.1 <v4.5.12Fix Suggestion:
Update to version v4.5.12https://github.com/vitejs/vite.git (GITHUB):
Affected version(s) >=v5.0.0 <v5.4.17Fix Suggestion:
Update to version v5.4.17https://github.com/vitejs/vite.git (GITHUB):
Affected version(s) >=v6.0.0 <v6.0.14Fix Suggestion:
Update to version v6.0.14https://github.com/vitejs/vite.git (GITHUB):
Affected version(s) >=v6.1.0 <v6.1.4Fix Suggestion:
Update to version v6.1.4https://github.com/vitejs/vite.git (GITHUB):
Affected version(s) >=v6.2.0 <v6.2.5Fix Suggestion:
Update to version v6.2.5vite (NPM):
Affected version(s) >=6.1.0 <6.1.4Fix Suggestion:
Update to version 6.1.4vite (NPM):
Affected version(s) >=5.0.0 <5.4.17Fix Suggestion:
Update to version 5.4.17vite (NPM):
Affected version(s) >=0.1.0 <4.5.12Fix Suggestion:
Update to version 4.5.12vite (NPM):
Affected version(s) >=6.2.0 <6.2.5Fix Suggestion:
Update to version 6.2.5vite (NPM):
Affected version(s) >=0.1.0 <4.5.12Fix Suggestion:
Update to version 4.5.12vite (NPM):
Affected version(s) >=6.0.0 <6.0.14Fix Suggestion:
Update to version 6.0.14Related ResourcesĀ (5)
Do you need more information?
Contact UsCVSS v4
Base Score:
6
Attack Vector
NETWORK
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
NONE
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
5.3
Attack Vector
NETWORK
Attack Complexity
HIGH
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Weakness Type (CWE)
EPSS
Base Score:
4.31