Skip to main content
No exploitation reportedFix available

CVE-2026-6402

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

No exploitation reported by the sources we read.

  • Published2026-05-12
  • Fixed in5.2.4
  • WeaknessCWE-749

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2026-05-1209:16CVE publishedNVD

Versions per branch

NVD · OSV
Webpack.js webpack-dev-server
BranchAffectedFixed in
5.2< 5.2.45.2.4

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As openjs, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • webpack-dev-serverother versions: not affected
    Affected
    • < 5.2.4fixed in 5.2.4semver

    Not affected = 5.2.4

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-05-12

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • @rootio/webpack-dev-serverRoot:npmall versions · fixed in 5.2.3-root.io.1
  • @rootio/webpack-dev-serverRoot:npmall versions · fixed in 3.11.3-root.io.1
  • @rootio/webpack-dev-serverRoot:npmall versions · fixed in 3.11.3-root.io.2
  • @rootio/webpack-dev-serverRoot:npmall versions · fixed in 3.11.3-root.io.3
  • @rootio/webpack-dev-serverRoot:npmall versions · fixed in 3.11.3-root.io.4
  • @rootio/webpack-dev-serverRoot:npmall versions · fixed in 4.10.0-root.io.1
  • @rootio/webpack-dev-serverRoot:npmall versions · fixed in 4.10.0-root.io.2
  • @rootio/webpack-dev-serverRoot:npmall versions · fixed in 4.10.0-root.io.3

61 more package ranges on OSV.dev

Vendor advisories

  • CVE-2026-6402 Red Hat Product Security77 known affected

    webpack-dev-server: webpack-dev-server: Information disclosure due to cross-origin source code exposure

    cryostat-openshift-console-plugin-npm as a component of Cryostat 4 · webpack-dev-server as a component of Cryostat 4 · gatekeeper/gatekeeper-rhel9 as a component of Gatekeeper 3 · +74 more

Full record on NVD

Fix

  1. Update Webpack.js webpack-dev-server to 5.2.4
  2. No fix available, says the vendor Red Hat Product Security CVE-2026-6402 · 74 productsFix deferred
  3. No fix planned, says the vendor Red Hat Product Security CVE-2026-6402 · 3 productsOut of support scope

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Published
2026-05-12
Last Modified
2026-06-17
NVD status
Analyzed
MSRC Title
webpack-dev-server vulnerable to cross-origin source code exposure on non-HTTPS origins
GitHub Advisory
GHSA-79cf-xcqc-c78w

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.

Is CVE-2026-6402 actively exploited?

Active exploitation of CVE-2026-6402 has not been confirmed. Its EPSS score was 0.3% on 2026-11-08, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-6402?

CVE-2026-6402 has a CVSS v3 base score of 6.5 (MEDIUM severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N.

Running webpack-dev-server? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record