Description
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.
Published: 2026-10-20
Score: 2.1 Low
EPSS: < 1% Very Low
KEV: No
Impact: Cross origin script execution
Action: Upgrade Now
AI Analysis

Impact

This CVE describes a flaw in Vite's custom middleware handling which allows an attacker to craft a URL that is passed unchanged to the server.transformIndexHtml function. The function then generates a proxy module URL that preserves leading slashes from the original request. If the transformed HTML contains an inline module script, the double slash causes the browser to fetch and execute a module from an attacker‑controlled location. This can lead to the execution of arbitrary code within the context of the served page, exposing sensitive data or enabling destructive actions. The weakness corresponds to CWE‑79 and CWE‑80, a type of cross‑site scripting vulnerability.

Affected Systems

Vite and Vite‑Plus versions earlier than 6.4.4, 7.3.7, 8.1.6, 8.2.4, and 8.3.3 are affected. Vendors include vitejs for both Vite and Vite‑Plus. The vulnerability arises when applications use custom middleware without sanitizing request URLs.

Risk and Exploitability

The CVSS score is 2.1, indicating a low severity reference. EPSS data is not available, and the issue is not listed in CISA's KEV catalog. The vulnerability is exploitable by an attacker who can control the development‑server request, such as through a public dev server or by manipulating the request from a trusted user. The exploit requires the presence of an inline module script in the served HTML, but once triggered it results in the loading of a malicious module that executes in the victim's browser context.

Generated by OpenCVE AI on October 22, 2026 at 19:58 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Vite 6.4.4, 7.3.7, 8.1.6, 8.2.4, or 8.3.3 or later to apply the fix.
  • Ensure that any custom middleware used in Vite sanitizes the request URL by stripping leading slashes and query components before passing it to server.transformIndexHtml.
  • Restrict or disable custom middleware usage in production environments to limit the attack surface.
  • Monitor the development server for unexpected double‑slash usage and enforce strict URL validation rules to prevent malicious module loading.

Generated by OpenCVE AI on October 22, 2026 at 19:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-9jrq-w75r-8gcw Vite: Cross origin script execution through Vite custom middleware
History

Wed, 28 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 21 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-79
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

threat_severity

Moderate


Tue, 20 Oct 2026 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Vitejs
Vitejs vite
Vitejs vite-plus
Vendors & Products Vitejs
Vitejs vite
Vitejs vite-plus

Tue, 20 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Vite: Cross origin script execution through Vite custom middleware
Weaknesses CWE-80
References
Metrics cvssV4_0

{'score': 2.1, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-28T14:11:03.638Z

Reserved: 2026-10-19T21:30:47.245Z

Link: CVE-2026-112945

cve-icon Vulnrichment

Updated: 2026-10-28T14:10:27.866Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-20T16:17:05.043

Modified: 2026-10-28T15:17:03.200

Link: CVE-2026-112945

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-20T15:00:58Z

Links: CVE-2026-112945 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T20:00:12Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • CWE-80

    Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)