Vite: Cross origin script execution through Vite custom middleware
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.
- Products
- vite, vite-plus
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-112945
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 11:37 UTC · Revision 2
Source evidence
Vite: Cross origin script execution through Vite custom middleware
core-cve · Original sourcePublished 20 Oct 2026, 15:00 UTC
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.
cve:CVE-2026-112945
vite
Fixed versions: Not specified
vite-plus
Fixed versions: Not specified
Complete source record
{
"id": "10c34a554278fa4451edd41bd303e94b15dafc3ec8373e7c5509ed4c75dcd2a1",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-112945",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Vite: Cross origin script execution through Vite custom middleware",
"summary": "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.",
"evidence": "cve:CVE-2026-112945",
"products": [
{
"name": {
"value": "vite",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
},
{
"name": {
"value": "vite-plus",
"evidence": "/containers/cna/affected/1/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "low",
"structured": {
"id": "CVE-2026-112945",
"aliases": [
"CVE-2026-112945"
],
"metrics": [
{
"cvssV4_0": {
"version": "4.0",
"baseScore": 2.1,
"attackVector": "NETWORK",
"baseSeverity": "LOW",
"vectorString": "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",
"userInteraction": "ACTIVE",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"privilegesRequired": "NONE",
"subIntegrityImpact": "NONE",
"vulnIntegrityImpact": "LOW",
"subAvailabilityImpact": "NONE",
"vulnAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"vulnConfidentialityImpact": "LOW"
}
}
],
"affected": [
{
"vendor": "vitejs",
"product": "vite",
"versions": [
{
"status": "affected",
"version": ">= 8.3.0, < 8.3.3"
},
{
"status": "affected",
"version": ">= 8.2.0, < 8.2.4"
},
{
"status": "affected",
"version": ">= 8.0.0, < 8.1.6"
},
{
"status": "affected",
"version": ">= 7.0.0, < 7.3.7"
},
{
"status": "affected",
"version": "< 6.4.4"
}
]
},
{
"vendor": "vitejs",
"product": "vite-plus",
"versions": [
{
"status": "affected",
"version": "< 1.1.0"
}
]
}
],
"modified": "2026-10-28T14:11:03.638Z",
"provider": "cve",
"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"
],
"provider_metadata": {
"adp": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2026-112945",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-10-28T14:10:43.858513Z"
}
}
}
],
"references": [
{
"url": "https://github.com/vitejs/vite/security/advisories/GHSA-9jrq-w75r-8gcw",
"tags": [
"exploit"
]
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2026-10-28T14:11:03.638Z"
}
}
],
"cna": {
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M",
"dateUpdated": "2026-10-20T15:00:58.170Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-112945",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 449322,
"published_at": "2026-10-20T15:00:58.17+00:00"
}