What’s Vulnerable › Vulnerabilities
CVE-2025-31125: Vite Vitejs Improper Access Control Vulnerability
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: yes — in CISA KEV since 2026-01-22
- EPSS: 74.9% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2025-03-31 · updated 2026-06-17
- Weakness: CWE-200
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 products
- vitejs vite: before 4.5.11; from 5.0.0 before 5.4.16; from 6.0.0 before 6.0.13; from 6.1.0 before 6.1.3; from 6.2.0 before 6.2.4 — fixed in 4.5.11, 5.4.16, 6.0.13, 6.1.3, 6.2.4
How to fix
Upgrade to a fixed version: vitejs vite 4.5.11, 5.4.16, 6.0.13, 6.1.3. Check the vendor advisory for mitigations.
References
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125
Get alerted when CVE-2025-31125 or the next vulnerability affects your stack