Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. vite
  4. ›
  5. CVE-2025-58751

CVE-2025-58751: Vite middleware may serve files starting with the same name with the public directory

September 9, 2025

Files starting with the same name with the public directory were served bypassing the server.fs settings.

References

  • github.com/advisories/GHSA-g4jq-h2w9-997c
  • github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb
  • github.com/vitejs/vite
  • github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d
  • github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069
  • github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec
  • github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0
  • github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c
  • nvd.nist.gov/vuln/detail/CVE-2025-58751

Code Behaviors & Features

Detect and mitigate CVE-2025-58751 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.4.20, all versions starting from 6.0.0 before 6.3.6, all versions starting from 7.0.0 before 7.0.7, all versions starting from 7.1.0 before 7.1.5

Fixed versions

  • 7.1.5
  • 7.0.7
  • 6.3.6
  • 5.4.20

Solution

Upgrade to versions 5.4.20, 6.3.6, 7.0.7, 7.1.5 or above.

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-284: Improper Access Control

Source file

npm/vite/CVE-2025-58751.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 27 Sep 2025 00:18:43 +0000.