Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure, Security bypass
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · NVD. 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. Vite exposes content of non-allowed files using ?inline&import or ?raw?import. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. This vulnerability is fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Active
- Automatable
- No
- Technical impact
- Total
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 | 6.2.0 to before 6.2.4; 6.1.0 to before 6.1.3; 6.0.0 to before 6.0.13; 5.0.0 to before 5.4.16; before 4.5.11 | 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11 | Patch available | CNA |
| — | vite (npm) | 6.2.0 to before 6.2.4 | 6.2.4 | Patch available | GHSA-4r4m-qw57-chr8 |
| — | vite (npm) | 6.1.0 to before 6.1.3 | 6.1.3 | Patch available | GHSA-4r4m-qw57-chr8 |
| — | vite (npm) | 6.0.0 to before 6.0.13 | 6.0.13 | Patch available | GHSA-4r4m-qw57-chr8 |
| — | vite (npm) | 5.0.0 to before 5.4.16 | 5.4.16 | Patch available | GHSA-4r4m-qw57-chr8 |
| — | vite (npm) | before 4.5.11 | 4.5.11 | Patch available | GHSA-4r4m-qw57-chr8 |
- vite Vendorvitejs Affected 6.2.0 to before 6.2.4; 6.1.0 to before 6.1.3; 6.0.0 to before 6.0.13; 5.0.0 to before 5.4.16; before 4.5.11 Fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11 Patch available CNA
- vite (npm) Vendor— Affected 6.2.0 to before 6.2.4 Fixed in 6.2.4 Patch available GHSA-4r4m-qw57-chr8
- vite (npm) Vendor— Affected 6.1.0 to before 6.1.3 Fixed in 6.1.3 Patch available GHSA-4r4m-qw57-chr8
- vite (npm) Vendor— Affected 6.0.0 to before 6.0.13 Fixed in 6.0.13 Patch available GHSA-4r4m-qw57-chr8
- vite (npm) Vendor— Affected 5.0.0 to before 5.4.16 Fixed in 5.4.16 Patch available GHSA-4r4m-qw57-chr8
- vite (npm) Vendor— Affected before 4.5.11 Fixed in 4.5.11 Patch available GHSA-4r4m-qw57-chr8
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* | before 4.5.11; 5.0.0 to before 5.4.16; 6.0.0 to before 6.0.13; 6.1.0 to before 6.1.3; 6.2.0 to before 6.2.4 | Vulnerable | vitejs |
- cpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* Versions before 4.5.11; 5.0.0 to before 5.4.16; 6.0.0 to before 6.0.13; 6.1.0 to before 6.1.3; 6.2.0 to before 6.2.4 Vulnerable ·vitejs
Remediation
- Fix · CNA vite (vitejs) Fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11
- Fix · GHSA-4r4m-qw57-chr8 vite (npm) Fixed in 6.2.4 Advisory →
- Fix · GHSA-4r4m-qw57-chr8 vite (npm) Fixed in 6.1.3 Advisory →
- Fix · GHSA-4r4m-qw57-chr8 vite (npm) Fixed in 6.0.13 Advisory →
- Fix · GHSA-4r4m-qw57-chr8 vite (npm) Fixed in 5.4.16 Advisory →
- Fix · GHSA-4r4m-qw57-chr8 vite (npm) Fixed in 4.5.11 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift distributed tracing 3 | Affected | No fix planned: Out of support scope |
Not affected: 3 products
- Red Hat Ansible Automation Platform 2
- Red Hat JBoss Enterprise Application Platform 8
- Red Hat JBoss Enterprise Application Platform Expansion Pack
Timeline
- 2026-01-22 Added to CISA KEV
- 2026-10-02 Threatist record created from CVE-2025-31125
- 2026-10-03 Alias added: GHSA-4r4m-qw57-chr8
References
More vitejs Vite vulnerabilities
- 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
- TI-2026-28351 Vite has a `server.fs.deny` bypass with queries CVSS 4.0HIGH 8.2
Sources
- CVE-2025-31125 · CVE Program
- CVE-2025-31125 · NVD
- CISA Known Exploited Vulnerabilities
- FIRST EPSS
- GHSA-4r4m-qw57-chr8 · GitHub Advisory Database · CC BY 4.0
- CVE-2025-31125 · 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