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.
In short
CVE-2025-31125 (Vite Vitejs Improper Access Control) has a CVSS 3.1 base score of 5.3, rated medium. CISA added it to the Known Exploited Vulnerabilities catalog on 22 Jan 2026. Fixed in Vitejs Vite 5.4.16 or later.
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.
CVSS 3.1 breakdown
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:NAffected products
- Vitejs Vite≥ 5.0.0 < 5.4.16 · ≥ 6.0.0 < 6.0.13 · ≥ 6.1.0 < 6.1.3 · ≥ 6.2.0 < 6.2.4
Remediation
Fixed in- Vitejs Vite≥ 5.4.16
References
Data from the NVD, CISA KEV catalog and FIRST EPSS. The CVSS 4.0 base score is shown where the NVD has one, otherwise CVSS 3.1.
