CVE-2025-31125
Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Also known as GHSA-4r4m-qw57-chr8
Mitigation
- Upgrade vite to one of 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11 (or later in the same release line).
Who should check
- Projects that depend on npm package vite (>= 6.2.0, < 6.2.4)
- Anyone running vitejs vite >= 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
Vulnerability facts
- Affected
- vite >= 6.2.0, < 6.2.4
- Fixed in
- 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11
- Exploited in the wild
- Yes: in CISA KEV since 2026-01-22; federal due date 2026-02-12
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- EPSS
- 14.85% chance of exploitation in 30 days (percentile 97, 2026-11-26)
- CWE
- CWE-200, CWE-284
- Modified
Description
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.
Affected and fixed versions
Timeline
- 2025-03-31 Published
- 2026-01-22 Added to CISA KEV (exploited in the wild)
- 2026-02-12 CISA remediation due date for US federal agencies
- 2026-09-10 Last modified
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-31125. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-31125.md Affected: vite >= 6.2.0, < 6.2.4 Fixed in: 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11 Steps: 1. Search this machine and project for vite (npm), vitejs vite: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2025-31125 being exploited?
Yes. CISA lists CVE-2025-31125 in its Known Exploited Vulnerabilities catalog since 2026-01-22, which means attacks have been seen. No public exploit code is known. EPSS estimates a 14.85% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-31125?
Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2025-31125?
vite >= 6.2.0, < 6.2.4.
Is there a fix for CVE-2025-31125?
Yes. Fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11. Upgrade vite to one of 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11 (or later in the same release line).
How do I check if I'm affected by CVE-2025-31125?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.