Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
CVE-2025-31125Published 31 Mar 2025, 17:06 UTC
Exploited in the wild
CISA added it to the Known Exploited Vulnerabilities list on 22 Jan 2026; US federal agencies must fix it by 12 Feb 2026.
Real-world risk
8.0/ 10High
Act now: it is being exploited.
PreliminaryFrom the CVSS vector only · confidence low
CVSS
5.3
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
Vite is a frontend tooling framework for javascript. Vite exposes content of non-allowed files using ?inline&import or ?raw?import. 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 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| ViteUbiquitous | >= 6.2.0, < 6.2.4; >= 6.1.0, < 6.1.3; >= 6.0.0, < 6.0.13; >= 5.0.0, < 5.4.16; < 4.5.11 | 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11 |
What to do
Update to a fixed version: 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data exposureReads secrets, credentials, databases, arbitrary files | From the CVSS vector | 0.80 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | HardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bug | From the CVSS vector | 0.45 |
Threat level T5: Exploited in the wild (× 1.00)
On CISA KEV or VulnCheck KEV, flagged exploited by ENISA's EUVD, CISA's SSVC says active, or the vendor's or CNA's own page says it is exploited
- On CISA’s Known Exploited Vulnerabilities list
- Public proof of concept on GitHub
- Nuclei scanner template (link)
- Reference tagged as exploit (link)
- CISA SSVC: exploitation active
EPSS 74.9% chance of exploitation in 30 days (percentile 100), as of 2026-12-02.
The arithmetic
- Prerequisites multiplied together0.315
- Threat T5: Exploited in the wild1.000
- 10 × impact 0.8 × prerequisites 0.315 × threat 12.520
- Exploited in the wild: attackers have already met the prerequisites, so they count only by their square root4.490
- Exploited in the wild: at least 88.000
- Rounded to one decimal between 0.1 and 108.0
Exploitation and evidence timeline
- 31 Mar 2025 Published
- 22 Jan 2026 Added to CISA KEV
- 3 Dec 2026 Public proof of concept on GitHub first seen
- 3 Dec 2026 Nuclei scanner template first seen
- 3 Dec 2026 Reference tagged as exploit first seen
- 3 Dec 2026 CISA SSVC: exploitation active first seen
- 3 Dec 2026 Risk 8.0 (cvss fallback)
Weakness
CWE-200, CWE-284
References
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8exploit, vendor-advisory
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949misc
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125government-resource
- CVE-2025-31125 on CVE.org