CVE-2025-31486vitejs vite
Medium 5.3 No auth needed
Follow: this CVE · vitejs · vitejs vite We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- —
- Auth required
- No
- Published
- Apr 3, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for vite.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | vite |
≥ 6.2.0 < 6.2.5 |
6.2.5 |
npm install vite@6.2.5 |
| npm | vite |
≥ 6.1.0 < 6.1.4 |
6.1.4 |
npm install vite@6.1.4 |
| npm | vite |
≥ 6.0.0 < 6.0.14 |
6.0.14 |
npm install vite@6.0.14 |
| npm | vite |
≥ 5.0.0 < 5.4.17 |
5.4.17 |
npm install vite@5.4.17 |
| npm | vite |
< 4.5.12 |
4.5.12 |
npm install vite@4.5.12 |
Per OSV / GitHub Advisories (GHSA-xcj6-pq6g-qj4x). Check the version in your lockfile before upgrading.
Affected products
- vitejs · vite
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.