Medium severity · published May 12, 2026
CVE-2026-6402
webpack-dev-server vulnerable to cross-origin source code exposure on non-HTTPS origins
6.5
CVSS
0.3%
EPSS
No
On KEV
Description
webpack-dev-server versions up to and including 5.2.3 are vulnerable to cross-origin source code exposure when serving over a non-potentially trustworthy origin such as plain HTTP. The previous fix relied on the Sec-Fetch-Mode and Sec-Fetch-Site request headers, which browsers omit for non-trustworthy origins, allowing a malicious site to load the bundled source as a script and read it across origins. Impact: an attacker controlling a website visited by a developer running webpack-dev-server can recover the application source code when the dev server runs over HTTP at a guessable host and port. Chromium based browsers from Chrome 142 onward are not affected due to local network access restrictions. Upgrade to webpack-dev-server 5.2.4 or later, which sets Cross-Origin-Resource-Policy: same-origin on responses.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
None
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 22% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
WE
webpack-dev-server · webpack-dev-server
before 5.2.4 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-6402
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-6402
Vendor Advisory
https://cna.openjsf.org/security-advisories.html
Mitigation
https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-79cf-xcqc-c78w
More from webpack-dev-server
8.2
CVE-2026-112085
webpack-dev-server vulnerable to cross-origin WebSocket access via proxied upgrades
5.3
CVE-2026-114348
webpack-dev-server vulnerable to information disclosure via Host validation bypass in the open-editor endpoint
5.3
CVE-2026-14631
webpack-dev-server vulnerable to denial of service via a malformed Host or Origin header
4.7
CVE-2026-14620
webpack-dev-server vulnerable to cross-site request forgery via internal developer endpoints
4.3
CVE-2026-9595
webpack-dev-server vulnerable to HMR WebSocket interception via permissive user proxies
