CVE-2025-31125 Details
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.
A vulnerability in Vite, a frontend tooling framework for JavaScript, allows the exposure of non-allowed files' contents through the Vite dev server. This issue affects versions 6.2.0 through 6.2.3, 6.1.0 through 6.1.2, 6.0.0 through 6.0.12, 5.0.0 through 5.4.15, and 4.5.10 and prior. The vulnerability arises when the dev server is explicitly exposed to the network, using the '--host' option or the 'server.host' configuration. Exploitation is achieved by appending specific query parameters to the request, which bypasses Vite's file serving restrictions and allows access to arbitrary files, such as system files.
Users can upgrade to Vite versions 6.2.4, 6.1.3, 6.0.13, 5.4.16, or 4.5.11 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 23, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8 | CISA-ADP | ExploitVendor Advisory |
| https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125 | CISA-ADP | US Government Resource |
| https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949 | [email protected] | Patch |
| https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8 | [email protected] | ExploitVendor Advisory |
This CVE is in CISA's Known Exploited Vulnerabilities Catalog
Reference CISA's BOD 22-01 and Known Exploited Vulnerabilities Catalog for further guidance and requirements.
| Vulnerability Name | Date Added | Due Date | Required Action |
|---|---|---|---|
| Vite Vitejs Improper Access Control Vulnerability | Jan 22, 2026 | Feb 12, 2026 | Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable. |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| NVD-CWE-noinfo | Insufficient Information to Classify Weakness | [email protected] |
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | [email protected] |
| CWE-284 | Improper Access Control | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| vitejs vite | < 4.5.11 >= 5.0.0, < 5.4.16 >= 6.0.0, < 6.0.13 >= 6.1.0, < 6.1.3 >= 6.2.0, < 6.2.4 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jan 23, 2026 | Modified Analysis | [email protected] |
| Jan 22, 2026 | CVE Modified | CISA-ADP |
| Sep 24, 2025 | Initial Analysis | [email protected] |
| Mar 31, 2025 | CVE Modified | CISA-ADP |
| Mar 31, 2025 | New CVE Received | [email protected] |