Skip to content
OpenAdvisories
Low · 2.3 Scanner template CVE-2025-58751 EUVD-2025-27181GHSA-g4jq-h2w9-997c

Vite middleware may serve files starting with the same name with the public directory

Published Sep 8, 2025 · Updated Sep 9, 2025 · Assigned by GitHub_M

Description

Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, files starting with the same name with the public directory were served bypassing the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or `server.host` config option), use the public directory feature (enabled by default), and have a symlink in the public directory are affected. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.

Affected products

VendorProductAffectedFixed
vitejs vite < 5.4.20, >= 6.0.0, < 6.3.6, >= 7.0.0, < 7.0.7, >= 7.1.0, < 7.1.5 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling langfuse-3-compat 3.225.7-r6 —
Wolfi rolling langfuse-3-worker 3.179.1-r3 —
Wolfi rolling vitess-23 +2 23.0.0-r2 —

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
npm vite >= 7.1.0, < 7.1.5 7.1.5 GHSA-g4jq-h2w9-997c
npm vite >= 7.0.0, < 7.0.7 7.0.7 GHSA-g4jq-h2w9-997c
npm vite >= 6.0.0, < 6.3.6 6.3.6 GHSA-g4jq-h2w9-997c
npm vite < 5.4.20 5.4.20 GHSA-g4jq-h2w9-997c

Advisories 3

References