CVE-2025-31125

CVE-2025-31125 is a medium-severity vulnerability in Vitejs Vite with a CVSS 3.x base score of 5.3. It is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, confirming it has been exploited in the wild (added 2026-01-22). The underlying weakness is classified as CWE-200.

Key facts

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.

Frequently asked questions

What is CVE-2025-31125?
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.
How severe is CVE-2025-31125?
CVE-2025-31125 has a CVSS 3.x base score of 5.3, rated medium severity. It is exploitable over network with high attack complexity, requires no privileges and user interaction. Impact on confidentiality is high, integrity none, and availability none.
Is CVE-2025-31125 being actively exploited?
Yes. CVE-2025-31125 is on CISA's Known Exploited Vulnerabilities (KEV) catalog, added on 2026-01-22, which means active exploitation has been confirmed. It should be prioritised for remediation.
What products are affected by CVE-2025-31125?
CVE-2025-31125 affects Vitejs Vite. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2025-31125?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Because this CVE is known to be actively exploited, treat remediation as urgent — CISA KEV typically sets a short remediation deadline.
Does CVE-2025-31125 have an EU (EUVD) identifier?
Yes. CVE-2025-31125 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-8866. It is also flagged as exploited in the EUVD (since 2026-01-22).
When was CVE-2025-31125 published?
CVE-2025-31125 was published on 2025-03-31 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Vitejs Vite

All CVEs affecting Vitejs Vite →

Other CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) vulnerabilities

Browse all CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) vulnerabilities →