Stackurity Start free trial

CVEs / CVE-2025-31125

CVE-2025-31125: Vite Vitejs Improper Access Control Vulnerability

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.

CISA, Known Exploited Vulnerabilities catalog

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.

The CVE record, via NVD · published 31 Mar 2025 · NVD status: Analyzed

Affected and fixed versions

As stated by the CVE record (from the CNA)
ProductAffectedFixed 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—
As stated by OSV
ProductAffectedFixed in
vite (npm)from 6.2.0, before 6.2.46.2.4
vite (npm)from 6.1.0, before 6.1.36.1.3
vite (npm)from 6.0.0, before 6.0.136.0.13
vite (npm)from 5.0.0, before 5.4.165.4.16
vite (npm)before 4.5.114.5.11

Package versions from GHSA-4r4m-qw57-chr8.

Exploitation

In CISA KEV since22 Jan 2026
Due date for US federal agencies12 Feb 2026
Used in ransomware campaignsUnknown
Required actionApply 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.17.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Scored by NVD
WeaknessCWE-200, CWE-284

References

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.