webpack-dev-server users' source code may be stolen when they access a malicious web site
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
webpack-dev-servernpm | < 5.2.1 | 5.2.1 |
Affected products
20- osv-coords19 versionspkg:apk/chainguard/argo-workflow-clipkg:apk/chainguard/argo-workflow-controllerpkg:apk/chainguard/argo-workflow-controller-compatpkg:apk/chainguard/argo-workflow-executorpkg:apk/chainguard/argo-workflow-executor-compatpkg:apk/chainguard/argo-workflowspkg:apk/chainguard/argo-workflows-known-hostspkg:apk/chainguard/argo-workflows-uipkg:apk/chainguard/argo-workflows-ui-3.7pkg:apk/wolfi/argo-workflow-clipkg:apk/wolfi/argo-workflow-controllerpkg:apk/wolfi/argo-workflow-controller-compatpkg:apk/wolfi/argo-workflow-executorpkg:apk/wolfi/argo-workflow-executor-compatpkg:apk/wolfi/argo-workflowspkg:apk/wolfi/argo-workflows-known-hostspkg:apk/wolfi/argo-workflows-uipkg:apk/wolfi/argo-workflows-ui-3.7pkg:npm/webpack-dev-server
< 3.6.10-r2+ 18 more
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.7.13-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.6.10-r2
- (no CPE)range: < 3.7.13-r2
- (no CPE)range: < 5.2.1
- Range: < 5.2.1
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-4v9v-hfq4-rm2vghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-30359ghsaADVISORY
- github.com/webpack/webpack-dev-server/commit/5c9378bb01276357d7af208a0856ca2163db188eghsaWEB
- github.com/webpack/webpack-dev-server/commit/d2575ad8dfed9207ed810b5ea0ccf465115a2239ghsax_refsource_MISCWEB
- github.com/webpack/webpack-dev-server/security/advisories/GHSA-4v9v-hfq4-rm2vghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.