Live threats

All CVEs / vitejs

CVE-2025-31486vitejs vite

Medium 5.3 No auth needed

Priority
47
CVSS 3.1
5.3
EPSS
—
Auth required
No
Published
Apr 3, 2025
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-200, CWE-284
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.

Original NVD text.

What to do

  1. Apply the vendor's security update for vite.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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

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.