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


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.03% (8th 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-10300777
  • published4 Jun 2025
  • disclosed3 Jun 2025
  • creditsapphi-red

Introduced: 3 Jun 2025

NewCVE-2025-30359  (opens in a new tab)
CWE-749  (opens in a new tab)

How to fix?

Upgrade webpack-dev-server to version 5.2.1 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 via the __webpack_modules__ object. An attacker can extract sensitive source code by injecting a malicious script into their site that utilizes Function::toString to access and serialize the functions stored within __webpack_modules__.

Note: This is only exploitable if the attacker knows both the specific port and the output entrypoint script path.

CVSS Base Scores

version 4.0
version 3.1