CVE-2026-6402 webpack-dev-server vulnerable to cross-origin source code exposure on non-HTTPS origins

Medium 5.3 Published Updated

An attacker can read application source code if webpack-dev-server runs over HTTP, exposing sensitive data to malicious websites.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-6402?

CVE-2026-6402 is a medium-severity vulnerability in webpack-dev-server, published on 12 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-749

Which versions are affected by CVE-2026-6402?

2 open source packages ship an affected version, including webpack-dev-server. It affects 1 product.

PackageAffectedFixed in
webpack-dev-server npmAll versions5.2.4
webpack-dev-server npmAll versions5.2.4

Products include Webpack.js Webpack-Dev-Server.

How do I fix CVE-2026-6402?

Upgrade webpack-dev-server to 5.2.4 or later.

Is CVE-2026-6402 being exploited?

There is no known exploitation of CVE-2026-6402 in the wild and no public exploit code.

Sources

Also known as CLEANSTART-2026-IF30069, CLSA-2026-1779238046, CLSA-2026-1784683094, CLSA-2026-1784769523, CLSA-2026-1784769600, CLSA-2026-1784856196 and 12 more.

Is CVE-2026-6402 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free