Cross-Origin Source Code Exposure in webpack-dev-server by Webpack
CVE-2026-6402

5.3MEDIUM

Key Information:

Vendor
CVE Published:
12 May 2026

What is CVE-2026-6402?

The vulnerability in webpack-dev-server affects versions up to and including 5.2.3, allowing attackers to exploit cross-origin source code exposure when served over untrusted origins like plain HTTP. This issue arises from the inability of traditional security headers, such as Sec-Fetch-Mode and Sec-Fetch-Site, to be included in requests from non-trustworthy origins. Consequently, an attacker can manipulate a website to retrieve application source code from a developer's machine running the vulnerable server configuration. It is crucial to upgrade to webpack-dev-server version 5.2.4 or later to implement the Cross-Origin-Resource-Policy: same-origin on responses, mitigating this risk effectively.

Affected Version(s)

webpack-dev-server 0 < 5.2.4

webpack-dev-server 5.2.4

References

CVSS V3.1

Score:
5.3
Severity:
MEDIUM
Confidentiality:
High
Integrity:
None
Availability:
High
Attack Vector:
Network
Attack Complexity:
High
Privileges Required:
None
User Interaction:
Required
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

sapphi-red
Ulises GascĂłn
Sebastian Beltran
Alexander Akait
.