PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-6402 Webpack.js CVE debrief

CVE-2026-6402 is a vulnerability in webpack-dev-server versions up to and including 5.2.3 that allows for cross-origin source code exposure when serving over a non-potentially trustworthy origin such as plain HTTP. This issue arises because the previous fix relied on the Sec-Fetch-Mode and Sec-Fetch-Site request headers, which browsers omit for non-trustworthy origins. Consequently, a malicious site can load the bundled source as a script and read it across origins. The impact of this vulnerability is that 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. Notably, Chromium-based browsers from Chrome 142 onward are not affected due to local network access restrictions. To mitigate this vulnerability, it is recommended to upgrade to webpack-dev-server 5.2.4 or later, which sets Cross-Origin-Resource-Policy: same-origin on responses.

Vendor
Webpack.js
Product
Webpack-Dev-Server
CVSS
MEDIUM 5.3
CISA KEV
Not listed in stored evidence
Original CVE published
2026-05-12
Original CVE updated
2026-11-11
Advisory published
2026-05-12
Advisory updated
2026-11-11

Who should care

Defenders and developers using webpack-dev-server, especially those serving it over HTTP, should be aware of this vulnerability and take steps to mitigate it. Chromium-based browser users are not affected, but other browser users may be vulnerable.

Why it matters

CVE-2026-6402 is a medium-severity vulnerability in webpack-dev-server that allows cross-origin source code exposure. Defenders should prioritize upgrading to version 5.2.4 or later and assess exposure for developers using webpack-dev-server over HTTP. Chromium-based browser users are not affected. The vulnerability's impact includes source code exposure, potential intellectual property theft, and delayed mitigation due to unaware developers.

  • Source code exposure can lead to intellectual property theft
  • Attackers can use exposed source code to identify vulnerabilities
  • Developers may be unaware of the exposure, delaying mitigation
  • Version verification is necessary to ensure mitigation

Technical summary

The vulnerability in webpack-dev-server allows for cross-origin source code exposure when serving over a non-potentially trustworthy origin such as plain HTTP. This is due to the previous fix relying on the Sec-Fetch-Mode and Sec-Fetch-Site request headers, which browsers omit for non-trustworthy origins. An attacker can load the bundled source as a script and read it across origins, recovering the application source code when the dev server runs over HTTP at a guessable host and port.

Defensive priority

Defenders should prioritize upgrading to webpack-dev-server 5.2.4 or later to prevent source code exposure. They should assess exposure for developers using webpack-dev-server over HTTP and verify the version in use. Chromium-based browser users are not affected, but other browser users may be vulnerable.

Recommended defensive actions

  • Upgrade to webpack-dev-server 5.2.4 or later
  • Assess exposure for developers using webpack-dev-server over HTTP
  • Verify the version of webpack-dev-server in use
  • Review compensating controls for exposed systems while remediation is scheduled and verified
  • Check relevant monitoring, detection, and logs for exposed assets that need extra review
  • Track exceptions, retest remediated assets, and close the item only after evidence is documented
  • Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up

Evidence notes

The CVE record and NVD vulnerability detail provide information on the vulnerability, its impact, and the recommended mitigation. Vendor advisories also offer guidance on addressing the issue. Evidence is limited to public sources and may not reflect the full scope or nuances of the vulnerability. Defenders should verify the vulnerability's impact on their specific environments and review official advisories for detailed mitigation steps.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-6402 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-6402

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-6402 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-6402

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

  • Source reference

    Unverified legacy reference

    URL: https://cna.openjsf.org/security-advisories.html

    ce714d77-add3-4f53-aff5-83d477b104bb - Vendor Advisory

  • Source reference

    Unverified legacy reference

    URL: https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-79cf-xcqc-c78w

    ce714d77-add3-4f53-aff5-83d477b104bb - Mitigation, Vendor Advisory

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.