CVE-2025-58752
JavaScript vulnerability analysis and mitigation

Overview

CVE-2025-58752 affects Vite, a frontend tooling framework for JavaScript. The vulnerability was discovered and disclosed on September 8, 2025, affecting versions prior to 7.1.5, 7.0.7, 6.3.6, and 5.4.20. The issue allows HTML files on the machine to be served regardless of the server.fs settings, potentially exposing sensitive information (GitHub Advisory).

Technical details

The vulnerability stems from the serveStaticMiddleware function's handling of HTML files. When a file with '.html' extension is requested, the server bypasses standard security checks and forwards the request to htmlFallbackMiddleware and indexHtmlMiddleware, which don't perform access control checks. This affects applications that expose the Vite dev server to the network using --host or server.host config option and use appType: 'spa' (default) or appType: 'mpa'. The CVSS v4.0 score is 2.3 (Low), with a vector string of CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N (GitHub Advisory).

Impact

The vulnerability can lead to unauthorized access to HTML files outside the intended directory structure, potentially exposing sensitive information. This affects both the development server and the preview server, where HTML files not under the output directory could be served (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20. Users are advised to upgrade to these or later versions to address the security issue (GitHub Advisory).

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-58451HIGH8.7
  • JavaScriptJavaScript
  • cattown
NoYesSep 08, 2025
CVE-2025-59037HIGH8.6
  • JavaScriptJavaScript
  • @duckdb/duckdb-wasm
NoYesSep 09, 2025
CVE-2025-58444HIGH8.6
  • JavaScriptJavaScript
  • @modelcontextprotocol/inspector
NoYesSep 08, 2025
CVE-2025-58752LOW2.3
  • JavaScriptJavaScript
  • vite
NoYesSep 08, 2025
CVE-2025-58751LOW2.3
  • JavaScriptJavaScript
  • vite
NoYesSep 08, 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