mediumCVSS 5.3Vulnerability

CVE-2026-6402

### Impact When webpack-dev-server is running on a non-HTTPS origin (the default), cross-origin requests from malicious websites can load the dev server's JavaScript bundles via `<script>` tags. The fix introduced in v5.2.1 (CVE-2025-30359) relied on `Sec-Fetch-Mode` and `Sec-Fetch-Site` request headers to block these requests, but browsers only send these headers for [potentially trustworthy origins](https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy). Over plain HTTP, the headers are absent and the check is bypassed. An attacker who knows the dev server's host, port, and output path can exfiltrate all module source code by intercepting the webpack runtime's module registration. This does not affect Chrome 142+ (and other Chromium-based browsers) due to [local network access restrictions](https://developer.chrome.com/release-notes/142#local_network_access_restrictions). ### Patches Patched in webpack-dev-server >= 5.2.4 by setting `Cross-Origin-Resource-Policy: same-origin` on responses. ### Workarounds Run the dev server with HTTPS enabled (`--https` or `server.type: 'https'` in config). ### Resources - [GHSA-4v9v-hfq4-rm2v](https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-4v9v-hfq4-rm2v) (CVE-2025-30359) - original vulnerability - [GHSA-9jgg-88mc-972h](https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-9jgg-88mc-972h) (CVE-2025-30360) - prior bypass

Properties

severity
medium
summary
webpack-dev-server vulnerable to cross-origin source code exposure on non-HTTPS origins
epss_score
0.00216
cvss_score
5.3
ghsa_published
2026-05-18T13:31:42Z
source_url
https://github.com/advisories/GHSA-79cf-xcqc-c78w
ghsa_updated
2026-05-18T13:31:44Z
ghsa_id
GHSA-79cf-xcqc-c78w
cve_id
CVE-2026-6402
cvss_vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
is_ghsa_only
false
epss_percentile
0.12322

Related Entities (5)

ENRICHED_BY (1)

[Source]FIRST EPSS

VULNERABLE_TO (1)

[Software]npm/webpack-dev-server

AFFECTS (1)

[Software]npm/webpack-dev-server

HAS_WEAKNESS (1)

[Weakness]Exposed Dangerous Method or Function

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-6402 (CVSS 5.3) — Ninja Signal Threat Intelligence | Ninja Signal