Read the docs
TI-2025-22667 Aliases CVE-2025-31486GHSA-xcj6-pq6g-qj4x

Vite allows server.fs.deny to be bypassed with .svg or relative paths

Priority MEDIUM 57CWE-200Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
High
Impact type
Information disclosure, Security bypass
Confidentiality · integrity · availability
High · None · None
Fix status
Partial Red Hat: 4 without a fix

Attack profile from CVSS 3.1 · 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. The contents of arbitrary files can be returned to the browser. By adding ?.svg with ?.wasm?init or with sec-fetch-dest: script header, the server.fs.deny restriction was able to bypass. This bypass is only possible if the file is smaller than build.assetsInlineLimit (default: 4kB) and when using Vite 6.0+. 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 4.5.12, 5.4.17, 6.0.14, 6.1.4, and 6.2.5.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.40461 98th percentileScored 2026-11-07
Fix Partial vite (vitejs): 4.5.12, 5.4.17, 6.0.14 +2vite (npm): 6.2.5, 6.1.4, 6.0.14 +2Red Hat: 4 without a fix

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

VendorProductAffected versionsFixed inStatusSource
vitejsvitebefore 4.5.12; 5.0.0 to before 5.4.17; 6.0.0 to before 6.0.14; 6.1.0 to before 6.1.4; 6.2.0 to before 6.2.54.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5Patch availableCNA
—vite (npm)6.2.0 to before 6.2.56.2.5Patch availableGHSA-xcj6-pq6g-qj4x
—vite (npm)6.1.0 to before 6.1.46.1.4Patch availableGHSA-xcj6-pq6g-qj4x
—vite (npm)6.0.0 to before 6.0.146.0.14Patch availableGHSA-xcj6-pq6g-qj4x
—vite (npm)5.0.0 to before 5.4.175.4.17Patch availableGHSA-xcj6-pq6g-qj4x
—vite (npm)before 4.5.124.5.12Patch availableGHSA-xcj6-pq6g-qj4x
  • vite Vendorvitejs Affected before 4.5.12; 5.0.0 to before 5.4.17; 6.0.0 to before 6.0.14; 6.1.0 to before 6.1.4; 6.2.0 to before 6.2.5 Fixed in 4.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5 Patch available CNA
  • vite (npm) Vendor— Affected 6.2.0 to before 6.2.5 Fixed in 6.2.5 Patch available GHSA-xcj6-pq6g-qj4x
  • vite (npm) Vendor— Affected 6.1.0 to before 6.1.4 Fixed in 6.1.4 Patch available GHSA-xcj6-pq6g-qj4x
  • vite (npm) Vendor— Affected 6.0.0 to before 6.0.14 Fixed in 6.0.14 Patch available GHSA-xcj6-pq6g-qj4x
  • vite (npm) Vendor— Affected 5.0.0 to before 5.4.17 Fixed in 5.4.17 Patch available GHSA-xcj6-pq6g-qj4x
  • vite (npm) Vendor— Affected before 4.5.12 Fixed in 4.5.12 Patch available GHSA-xcj6-pq6g-qj4x

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:vitejs:vite:*:*:*:*:*:*:*:*——vitejs
  • cpe:2.3:a:vitejs:vite:*:*:*:*:*:*:*:* Versions — — ·vitejs

Remediation

  • Fix · CNA vite (vitejs) Fixed in 4.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5
  • Fix · GHSA-xcj6-pq6g-qj4x vite (npm) Fixed in 6.2.5 Advisory →
  • Fix · GHSA-xcj6-pq6g-qj4x vite (npm) Fixed in 6.1.4 Advisory →
  • Fix · GHSA-xcj6-pq6g-qj4x vite (npm) Fixed in 6.0.14 Advisory →
  • Fix · GHSA-xcj6-pq6g-qj4x vite (npm) Fixed in 5.4.17 Advisory →
  • Fix · GHSA-xcj6-pq6g-qj4x vite (npm) Fixed in 4.5.12 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Ansible Automation Platform 2AffectedNo fix yet: Fix deferred
Red Hat JBoss Enterprise Application Platform 8AffectedNo fix yet: Fix deferred
Red Hat JBoss Enterprise Application Platform Expansion PackAffectedNo fix yet: Fix deferred
Red Hat OpenShift distributed tracing 3AffectedNo fix yet: Fix deferred

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-31486
  2. 2026-10-03 Alias added: GHSA-xcj6-pq6g-qj4x

References

  • TI-2025-22386 Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query KEVCVSS 3.1HIGH 7.5
  • TI-2025-41248 Code injection in vitejs vite-plugin-react CVSS 3.1CRITICAL 9.8
  • TI-2026-28350 Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket CVSS 4.0HIGH 8.2
  • TI-2025-41735 @vitejs/plugin-rsc has Arbitrary File Read via `/__vite_rsc_findSourceMapURL` Endpoint on Development CVSS 3.1HIGH 7.5
  • 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
See all 31 →

Sources