CVE-2025-30359 webpack-dev-server users' source code may be stolen when they access a malicious web site

Medium 5.3 Published Updated

Attackers can steal source code from developers using webpack-dev-server by accessing a malicious website, requiring knowledge of the port and script path.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-30359?

CVE-2025-30359 is a medium-severity vulnerability in webpack-dev-server, published on 3 Jun 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

webpack-dev-server allows users to use webpack with a development server that provides live reloading. Prior to version 5.2.1, webpack-dev-server users' source code may be stolen when they access a malicious web site. Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject a malicious script in their site and run the script. Note that the attacker has to know the port and the output entrypoint script path. Combined with prototype pollution, the attacker can get a reference to the webpack runtime variables. By using `Function::toString` against the values in `__webpack_modules__`, the attacker can get the source code. Version 5.2.1 contains a patch for the issue.

Weakness: CWE-749

Which versions are affected by CVE-2025-30359?

2 open source packages ship an affected version, including webpack-dev-server. It affects 1 product.

PackageAffectedFixed in
webpack-dev-server npmAll versions5.2.1
webpack-dev-server npmAll versions5.2.1

Products include Webpack.js Webpack-Dev-Server.

How do I fix CVE-2025-30359?

Upgrade webpack-dev-server to 5.2.1 or later.

Is CVE-2025-30359 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-30359 exists.

Sources

Also known as CLEANSTART-2026-VG68470, CLSA-2026-1774398064, CLSA-2026-1784769495, CLSA-2026-1784769529, GHSA-4v9v-hfq4-rm2v, MINI-2fx7-q59f-h942 and 2 more.

Is CVE-2025-30359 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free