Skip to main content

Vite CVE-2026-112945

| EUVDEUVD-2026-105125 LOW
Basic XSS (CWE-80)
2026-10-20 GitHub_M GHSA-9jrq-w75r-8gcw
2.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Lure developer to crafted dev-server URL
  2. Delivery
    Deliver protocol-relative path with leading double slash
  3. Exploit
    Preserved slashes yield external proxy module URL
  4. Execution
    Browser fetches attacker-controlled module
  5. Persist
    Execute script in Vite page context
  6. Impact
    Exfiltrate page data or trigger app actions

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization HTML tag escaping
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a specific non-default deployment: the application must use custom middleware that passes an unchanged browser request URL directly into server.transformIndexHtml, AND this affects only the Vite DEVELOPMENT server (not production builds). The transformed HTML must contain an inline module <script>, and the request URL must carry attacker-controlled leading double slashes (protocol-relative, e.g. //evil.example.com/...). Limiting factors: a victim developer/user must actively load the attacker-crafted dev-server page (UI:A), the vulnerable custom-middleware pattern must be present (AT:P - not Vite's default behavior), and exposure is confined to the local development environment rather than deployed production assets.

Impact

Real-world risk is LOW, and the signals are largely consistent on this. The vendor CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N) yields a base score of only 2.1: although the attack vector is network-facing and requires no authentication (PR:N), it carries AT:P (a specific attack requirement must be met) and UI:A (the victim must actively load a crafted page), with only Low confidentiality and integrity impact and no availability impact. Critically, this is a flaw in Vite's DEVELOPMENT server, not production builds, and it only manifests when an application deploys custom middleware that forwards an unchanged browser request URL into server.transformIndexHtml - a non-default coding pattern. No EPSS score was supplied in the input and the CVE is not on CISA KEV; there is no public exploit identified at time of analysis (no POC flag set), only a security advisory and the fixing PR/commit. The signals do not conflict: a genuinely low CVSS aligns with the absence of KEV/POC and the narrow, developer-environment-only exposure. This is a legitimate XSS (CWE-80) worth patching during normal maintenance, but it is NOT a widespread-exploitation priority - treat it as a low-severity hygiene fix rather than an emergency.

Exploit ScenarioDerived

A developer runs a Vite dev server behind custom middleware that passes the raw request URL into transformIndexHtml. An attacker lures that developer into opening a crafted dev-server URL beginning with a double slash (e.g. //evil.example.com/payload.js?...); Vite preserves the leading slashes, producing a protocol-relative proxy module URL in an inline <script>. The victim's browser then fetches and executes the attacker-hosted module within the Vite-served page, exposing page data or performing actions available to the app. No public exploit is identified at time of analysis, though the fixing PR includes regression tests demonstrating the vector.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 20, 2026

A crafted request URL containing leading double slashes can cause the Vite development server to emit a protocol-relative module URL in transformed HTML, so a victim's browser fetches and executes an attacker-hosted module inside the Vite-served page. Only applications built on custom middleware that forwards an unchanged browser request URL into server.transformIndexHtml are affected, and the exposure is limited to the dev server rather than production builds; the impacted code paths exist in Vite before 6.4.4, 7.3.7, 8.1.6, 8.2.4, and 8.3.3. There is no public exploit identified at time of analysis and the issue is not in CISA KEV; exploitation additionally requires a victim developer to actively load the malicious page, which keeps real-world risk LOW.

RemediationAI

Vendor-released patch: upgrade to Vite 6.4.4, 7.3.7, 8.1.6, 8.2.4, or 8.3.3 depending on your current major/minor line (see https://github.com/vitejs/vite/security/advisories/GHSA-9jrq-w75r-8gcw). Where an immediate upgrade is not possible, remove the vulnerable pattern in custom middleware: do not pass an unvalidated browser request URL into server.transformIndexHtml - strip the query string and collapse any leading multiple slashes first (the upstream fix uses cleanUrl plus a /^\/{2,}/g replacement), trading a small behavioral change to how dev HTML paths are matched for elimination of the protocol-relative URL injection. As additional compensating controls, avoid inline module <script> blocks in HTML served through the dev server (the attack chain requires one, so removing them breaks exploitation, though it may inconvenience development), and never expose the Vite dev server to untrusted networks or open untrusted links while it is running - binding to localhost and requiring developers to restart the server after testing limits the attack surface at the cost of reduced collaboration convenience. Verify the fix by confirming the html-proxy src attribute in transformed output never begins with // as the upstream regression tests do.

Affected VersionsENISA

vite 8.3.0, < 8.3.3
vite 8.0.0, < 8.1.6
vite < 6.4.4
vite 7.0.0, < 7.3.7
vite 8.2.0, < 8.2.4
vite-plus < 1.1.0

Affected Packages

npm vite fix: 6.4.4, 7.3.7, 8.1.6, 8.2.4, 8.3.3
npm vite-plus fix: 1.1.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Vite's dev-server HTML transform pipeline rewrites inline module scripts in index.html into proxied module URLs (the ?html-proxy&index=N.js form) so the browser can load them as separate modules. To do this, getHtmlFilename resolves the incoming request URL against the project root to find the on-disk HTML file, and the same query-bearing URL is then reused to construct the proxy module identifier. In the vulnerable versions the leading slashes of an attacker-supplied URL were preserved when building that identifier, producing a URL that begins with two slashes. In browser URL semantics a leading // is protocol-relative, meaning the resource is resolved against an external host rather than the dev server origin - so when the transformed page contains an inline module script, the browser fetches and executes the attacker's module with the origin and privileges of the Vite dev page. The weakness is classified CWE-80 (improper neutralization of script-related HTML tags, i.e. basic XSS) because attacker-influenced URL content escapes into executable script markup. The upstream fix adds a cleanUrl() call so path resolution ignores the query string and collapses runs of two or more leading slashes to a single slash before generating the proxy URL, with regression tests asserting the emitted src no longer starts with //.

Know when Vite gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 2.1 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 4.2 MEDIUM

AV:N for dev-server reachability and PR:N since no auth is needed, but AC:H because it depends on non-default custom middleware, and UI:R as the victim must load a crafted page; limited C:L/I:L.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 20, 2026 - 17:18 EUVD
CVE Published
Oct 20, 2026 - 15:00 cve.org
LOW 2.1

DescriptionCVE.org

Vite is a frontend tooling framework for JavaScript. Prior to 6.4.4, 7.3.7, 8.1.6, 8.2.4, and 8.3.3, applications using custom middleware are vulnerable when they pass an unchanged browser request URL to server.transformIndexHtml. getHtmlFilename uses the query-bearing request URL to resolve an existing local file while preserving attacker-supplied leading slashes in the generated proxy module URL. If the transformed HTML contains an inline module script and a victim browser loads the crafted development-server page, the leading double slash makes the browser fetch and execute an attacker-controlled module in the Vite-served page. This execution can expose sensitive page data or permit critical actions available to the affected application. This issue is fixed in versions 6.4.4, 7.3.7, 8.1.6, 8.2.4, and 8.3.3.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 99 npm packages depend on vite (33 direct, 68 indirect)
  • 2 npm packages depend on vite-plus (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 8.3.0 and other introduced versions.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
High
Vite is among the most widely used JavaScript frontend build/dev toolchains
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Vite

View all
CVE-2025-31125 MEDIUM POC
5.3 Mar 31

Vite is a frontend tooling framework for javascript. Rated medium severity (CVSS 5.3), this vulnerability is remotely ex

CVE-2025-30208 MEDIUM POC
5.3 Mar 24

Vite, a provider of frontend development tooling, has a vulnerability in versions prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15,

CVE-2024-52011 HIGH POC
7.5 Jun 01

launch-editor allows users to open files with line numbers in editor from Node.js. Rated high severity (CVSS 7.5), this

CVE-2024-23331 HIGH POC
7.5 Jan 19

Vite is a frontend tooling framework for javascript. Rated high severity (CVSS 7.5), this vulnerability is remotely expl

CVE-2023-34092 HIGH POC
7.5 Jun 01

Vite provides frontend tooling. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no authentic

CVE-2025-46565 MEDIUM POC
6.0 May 01

Vite is a frontend tooling framework for javascript. Rated medium severity (CVSS 6.0), this vulnerability is remotely ex

CVE-2023-49293 MEDIUM POC
6.1 Dec 04

Vite is a website frontend framework. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploitable, no a

CVE-2025-67489 CRITICAL
9.8 Dec 09

Arbitrary remote code execution in @vitejs/plugin-rsc 0.5.5 and earlier lets unauthenticated network attackers run JavaS

CVE-2022-35204 MEDIUM POC
4.3 Aug 18

Vitejs Vite before v2.9.13 was discovered to allow attackers to perform a directory traversal via a crafted URL to the v

CVE-2026-112942 HIGH
7.5 Oct 20

Path-validation bypass in launch-editor before 2.14.2 on Windows allows unauthenticated remote attackers to pass a craft

CVE-2026-118662 MEDIUM
6.9 Oct 28

Information disclosure in the Vite development server 6.4.4 lets a network attacker retrieve files that server.fs.deny i

CVE-2025-58751 LOW POC
2.3 Sep 08

Vite is a frontend tooling framework for JavaScript. Rated low severity (CVSS 2.3), this vulnerability is remotely explo

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy