CVEs / CVE-2025-31125
CVE-2025-31125: Vite Vitejs Improper Access Control Vulnerability
- Known exploited in the CISA KEV catalog since 22 Jan 2026
- high 7.5 CVSS 3.1 (NVD)
- EPSS 74.9% chance of exploitation in the next 30 days, higher than 99% of CVEs (30 Oct 2026)
- Last changed at its sources
Are you affected? Check your servers with Stackurity: it lists the software on each server and the vulnerabilities to fix first.
Check your servers with Stackurity Already using Stackurity? Search for CVE-2025-31125
Summary
Vite Vitejs contains an improper access control vulnerability that 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.
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
| Product | Affected | Fixed in |
|---|---|---|
| vitejs vite | >= 6.2.0, < 6.2.4 | — |
| vitejs vite | >= 6.1.0, < 6.1.3 | — |
| vitejs vite | >= 6.0.0, < 6.0.13 | — |
| vitejs vite | >= 5.0.0, < 5.4.16 | — |
| vitejs vite | < 4.5.11 | — |
| Product | Affected | Fixed in |
|---|---|---|
| vite (npm) | from 6.2.0, before 6.2.4 | 6.2.4 |
| vite (npm) | from 6.1.0, before 6.1.3 | 6.1.3 |
| vite (npm) | from 6.0.0, before 6.0.13 | 6.0.13 |
| vite (npm) | from 5.0.0, before 5.4.16 | 5.4.16 |
| vite (npm) | before 4.5.11 | 4.5.11 |
Package versions from GHSA-4r4m-qw57-chr8.
Exploitation
| In CISA KEV since | 22 Jan 2026 |
|---|---|
| Due date for US federal agencies | 12 Feb 2026 |
| Used in ransomware campaigns | Unknown |
| Required action | Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable. |
Severity
| CVSS 3.1 | 7.5 highCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NScored by NVD |
|---|---|
| Weakness | CWE-200, CWE-284 |
References
- CVE-2025-31125 on NVD
- CVE-2025-31125 in the CISA KEV catalog
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949 (cited by CISA)
- CVE-2025-31125 on OSV
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949 Patch
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8 Exploit, Vendor Advisory
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125 US Government Resource
Sources
Exploitation status from the CISA Known Exploited Vulnerabilities catalog. EPSS scores from FIRST. Descriptions, severity and references from the National Vulnerability Database. Open-source package versions from OSV (CC-BY 4.0). Text is shown as each source states it; Stackurity does not edit it. Check the vendor's advisory before acting.
This product uses data from the NVD API but is not endorsed or certified by the NVD.