Vite middleware may serve files starting with the same name with the public directory
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Information disclosure, Security bypass
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Partial Red Hat: 20 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-200 and CWE-284.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| vitejs | vite | before 5.4.20; 6.0.0 to before 6.3.6; 7.0.0 to before 7.0.7; 7.1.0 to before 7.1.5 | 5.4.20, 6.3.6, 7.0.7, 7.1.5 | Patch available | CNA |
| — | vite (npm) | 7.1.0 to before 7.1.5 | 7.1.5 | Patch available | GHSA-g4jq-h2w9-997c |
| — | vite (npm) | 7.0.0 to before 7.0.7 | 7.0.7 | Patch available | GHSA-g4jq-h2w9-997c |
| — | vite (npm) | 6.0.0 to before 6.3.6 | 6.3.6 | Patch available | GHSA-g4jq-h2w9-997c |
| — | vite (npm) | before 5.4.20 | 5.4.20 | Patch available | GHSA-g4jq-h2w9-997c |
- vite Vendorvitejs Affected before 5.4.20; 6.0.0 to before 6.3.6; 7.0.0 to before 7.0.7; 7.1.0 to before 7.1.5 Fixed in 5.4.20, 6.3.6, 7.0.7, 7.1.5 Patch available CNA
- vite (npm) Vendor— Affected 7.1.0 to before 7.1.5 Fixed in 7.1.5 Patch available GHSA-g4jq-h2w9-997c
- vite (npm) Vendor— Affected 7.0.0 to before 7.0.7 Fixed in 7.0.7 Patch available GHSA-g4jq-h2w9-997c
- vite (npm) Vendor— Affected 6.0.0 to before 6.3.6 Fixed in 6.3.6 Patch available GHSA-g4jq-h2w9-997c
- vite (npm) Vendor— Affected before 5.4.20 Fixed in 5.4.20 Patch available GHSA-g4jq-h2w9-997c
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* | before 5.4.20; 6.0.0 to before 6.3.6; 7.0.0 to before 7.0.7; 7.1.0 to before 7.1.5 | Vulnerable | vitejs |
- cpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* Versions before 5.4.20; 6.0.0 to before 6.3.6; 7.0.0 to before 7.0.7; 7.1.0 to before 7.1.5 Vulnerable ·vitejs
Remediation
- Fix · CNA vite (vitejs) Fixed in 5.4.20, 6.3.6, 7.0.7, 7.1.5
- Fix · GHSA-g4jq-h2w9-997c vite (npm) Fixed in 7.1.5 Advisory →
- Fix · GHSA-g4jq-h2w9-997c vite (npm) Fixed in 7.0.7 Advisory →
- Fix · GHSA-g4jq-h2w9-997c vite (npm) Fixed in 6.3.6 Advisory →
- Fix · GHSA-g4jq-h2w9-997c vite (npm) Fixed in 5.4.20 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Cryostat 4 | Affected | No fix yet: Fix deferred |
| Gatekeeper 3 | Affected | No fix yet: Fix deferred |
| Migration Toolkit for Virtualization | Affected | No fix yet: Fix deferred |
| Multicluster Engine for Kubernetes | Affected | No fix yet: Fix deferred |
| Multicluster Global Hub | Affected | No fix yet: Fix deferred |
| OpenShift Service Mesh 3 | Affected | No fix yet: Fix deferred |
| Red Hat Advanced Cluster Management for Kubernetes 2 | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Data Grid 8 | Affected | No fix yet: Fix deferred |
| Red Hat Discovery 1 | Affected | No fix yet: Fix deferred |
| Red Hat Discovery 2 | Affected | No fix yet: Fix deferred |
| Red Hat JBoss Enterprise Application Platform 8 | Affected | No fix yet: Fix deferred |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift GitOps | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift distributed tracing 3 | Affected | No fix yet: Fix deferred |
| Red Hat Openshift Data Foundation 4 | Affected | No fix yet: Fix deferred |
| Red Hat build of Apicurio Registry 2 | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-02 Threatist record created from CVE-2025-58751
- 2026-10-03 Alias added: GHSA-g4jq-h2w9-997c
References
Patch 5
- https://github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb
- https://github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d
- https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069
- https://github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec
- https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0
More vitejs Vite vulnerabilities
- TI-2025-22386 Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query KEVCVSS 3.1HIGH 7.5
- TI-2026-28350 Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket CVSS 4.0HIGH 8.2
- TI-2025-21544 Vite bypasses server.fs.deny when using `?raw??` CVSS 3.1HIGH 7.5
- TI-2023-16938 Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//) CVSS 3.1HIGH 7.5
- TI-2026-38634 Vite: `server.fs.deny` bypass on Windows alternate paths CVSS 4.0HIGH 8.2
- TI-2026-28352 Vite has a Path Traversal in Optimized Deps `.map` Handling CVSS 4.0MEDIUM 6.3
Sources
- CVE-2025-58751 · CVE Program
- CVE-2025-58751 · NVD
- FIRST EPSS
- GHSA-g4jq-h2w9-997c · GitHub Advisory Database · CC BY 4.0
- CVE-2025-58751 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences