CVE-2025-31125
JavaScript vulnerability analysis and mitigation

Overview

Vite, a frontend tooling framework for JavaScript, has been found to contain a security vulnerability (CVE-2025-31125) that allows unauthorized access to non-allowed files. The vulnerability affects applications that explicitly expose the Vite dev server to the network through the --host or server.host config option. The issue was discovered and disclosed on March 31, 2025, affecting multiple versions of Vite including versions 6.2.0-6.2.3, 6.1.0-6.1.2, 6.0.0-6.0.12, 5.0.0-5.4.15, and versions prior to 4.5.11 (GitHub Advisory).

Technical details

The vulnerability allows attackers to bypass path restrictions and access arbitrary files using two methods: base64 encoded content of non-allowed files can be exposed using ?inline&import query parameters, and content of non-allowed files can be exposed using ?raw?import. The vulnerability has been assigned a CVSS v3.1 base score of 5.3 (Medium) with the vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N. The issue is classified under CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) and CWE-284 (Improper Access Control) (GitHub Advisory).

Impact

The vulnerability enables attackers to access and read arbitrary files on affected servers, potentially exposing sensitive information. The impact is particularly significant for development servers that are exposed to the network, as it could lead to unauthorized access to confidential data (GBHackers).

Mitigation and workarounds

The vulnerability has been patched in versions 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11. Users are strongly advised to upgrade to these patched versions. If immediate upgrading is not possible, it is recommended to limit access to the Vite development server by implementing network restrictions (GBHackers).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59145HIGH8.8
  • JavaScriptJavaScript
  • color-name
NoYesSep 15, 2025
CVE-2025-59331HIGH8.8
  • JavaScriptJavaScript
  • is-arrayish
NoYesSep 15, 2025
CVE-2025-59330HIGH8.8
  • JavaScriptJavaScript
  • error-ex
NoYesSep 15, 2025
CVE-2025-59162HIGH8.8
  • JavaScriptJavaScript
  • color-convert
NoYesSep 15, 2025
CVE-2025-9862MEDIUM6.1
  • JavaScriptJavaScript
  • ghost
NoYesSep 15, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management