CVE-2026-6402

MEDIUM CVSS 3.1: 6.5 EPSS 0.29%
Updated Jun 17, 2026
Webpack.Js
Parameter Value
CVSS 6.5 (MEDIUM)
Affected Versions before 5.2.4
Fixed In 5.2.4
Type CWE-749
Vendor Webpack.Js
Public PoC No

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.

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Privileges Required
None
No privileges needed
User Interaction
Required
User action required

Impact Assessment

Confidentiality
High
Complete data leak
Integrity
None
No data modification
Availability
None
No disruption

CVSS Vector v3.1

Weakness Type (CWE)

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Webpack.Js Webpack-Dev-Server
cpe:2.3:a:webpack.js:webpack-dev-server:*:*:*:*:*:*:*:*
— 5.2.4