CVE-2026-6402

CVE-2026-6402 is a medium-severity vulnerability in Webpack.js Webpack-dev-server with a CVSS 3.x base score of 5.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-749.

Key facts

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.

Frequently asked questions

What is CVE-2026-6402?
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.
How severe is CVE-2026-6402?
CVE-2026-6402 has a CVSS 3.x base score of 5.3, rated medium severity. It is exploitable over network with high attack complexity, requires no privileges and user interaction. Impact on confidentiality is high, integrity none, and availability none.
Is CVE-2026-6402 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (12th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2026-6402?
CVE-2026-6402 affects Webpack.js Webpack-dev-server. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2026-6402?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
Does CVE-2026-6402 have an EU (EUVD) identifier?
Yes. CVE-2026-6402 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-29404.
When was CVE-2026-6402 published?
CVE-2026-6402 was published on 2026-05-12 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Webpack.js Webpack-dev-server

All CVEs affecting Webpack.js Webpack-dev-server →

Other CWE-749 vulnerabilities

Browse all CWE-749 vulnerabilities →