Exposed Dangerous Method or Function Affecting webpack-dev-server package, versions <5.2.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-WEBPACKDEVSERVER-16642067
  • published12 May 2026
  • disclosed12 May 2026
  • creditsapphi-red

Introduced: 12 May 2026

CVE-2026-6402  (opens in a new tab)
CWE-749  (opens in a new tab)

How to fix?

Upgrade webpack-dev-server to version 5.2.4 or higher.

Overview

webpack-dev-server is an Uses webpack with a development server that provides live reloading. It should be used for development only.

Affected versions of this package are vulnerable to Exposed Dangerous Method or Function in Server.js, when handling non-HTTPS responses. An attacker can expose source code by tricking a developer into visiting a malicious site that retrieves the code via <script> element. This is only exploitable while the development server is running over plain HTTP, by the attacker guessing the target host and port.

Note: This is a bypass of the fix for the vulnerability described in CVE-2025-30359, which blocks the cross-origin leak for trusted (HTTPS) connections only.

CVSS Base Scores

version 4.0
version 3.1