webpack-dev-server

Ecosystem: npm

Downloads: 69.05 Mln

Vulnerabilities from the last (months)
  • 0CriticalAffects 0 versions
  • 1HighAffects 1 version
  • 0MediumAffects 0 versions
  • 6ModerateAffects 6 versions
  • 0LowAffects 0 versions
Severity distribution (all time)
7vulnerabilities
  • Critical0 (0.0%)
  • High1 (14.3%)
  • Medium0 (0.0%)
  • Moderate6 (85.7%)
  • Low0 (0.0%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 2 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 2
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 2
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0

Vulnerabilities (7)

Known vulnerabilities affecting webpack-dev-server, based on data from OSV.

Vulnerabilities affecting webpack-dev-server
IDSeveritySummaryAffected versionsPublishedSource
GHSA-f5vj-f2hx-8m93Moderatewebpack-dev-server vulnerable to cross-site request forgery via internal developer endpoints### Impact The internal `/webpack-dev-server/open-editor` and `/webpack-dev-server/invalidate` endpoints perform state-changing actions on any `GET` request, without verifying that the request originated from the dev server's own page. Any website a developer visits while the dev server is running can trigger them cross-origin with no interaction beyond the visit. An attacker can open an arbitrary existing local file in the developer's editor, including files outside the project root (e.g. `~/.ssh/config`). The file's contents are not returned to the attacker. Repeated requests can also spaw
  • < 5.2.6
GitHub (opens in a new tab)
GHSA-m28w-2pqf-7qgjModeratewebpack-dev-server vulnerable to denial of service via a malformed Host or Origin header### Impact An unauthenticated peer that can reach the `webpack-dev-server` process can terminate it by sending either a normal HTTP request with a malformed `Host` header, or a WebSocket upgrade to the default `/ws` endpoint with a malformed `Origin` header. The malformed header triggers an uncaught exception in the host-validation path and crashes the dev server process. ### Patches Fixed in `webpack-dev-server` 5.2.6 by treating malformed `Host` and `Origin` header values as invalid rather than throwing (see [PR #5699](https://github.com/webpack/webpack-dev-server/pull/5699)). ### Workar
  • < 5.2.6
GitHub (opens in a new tab)
GHSA-mx8g-39q3-5c79Moderatewebpack-dev-server vulnerable to HMR WebSocket interception via permissive user proxies### Impact When a user-configured proxy on `webpack-dev-server` has a broad context (e.g. `/`) and `ws: true`, it also intercepts the dev server's own HMR WebSocket and forwards it to the proxy target. This leaks the browser's cookies and `Origin` header to the backend, bypasses the dev server's Host/Origin validation, and corrupts the HMR socket (both HMR and the proxy end up writing to the same socket). ### Patches Fixed in `webpack-dev-server` 5.2.5. ### Workarounds Scope user-defined proxy `context` to specific paths instead of `/`, or omit `ws: true` from the proxy entry when WebSock
  • < 5.2.5
GitHub (opens in a new tab)
GHSA-79cf-xcqc-c78wModeratewebpack-dev-server vulnerable to cross-origin source code exposure on non-HTTPS origins### Impact When webpack-dev-server is running on a non-HTTPS origin (the default), cross-origin requests from malicious websites can load the dev server's JavaScript bundles via `<script>` tags. The fix introduced in v5.2.1 (CVE-2025-30359) relied on `Sec-Fetch-Mode` and `Sec-Fetch-Site` request headers to block these requests, but browsers only send these headers for [potentially trustworthy origins](https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy). Over plain HTTP, the headers are absent and the check is bypassed. An attacker who knows the dev server's host, port, an
  • < 5.2.4
GitHub (opens in a new tab)
GHSA-4v9v-hfq4-rm2vModeratewebpack-dev-server users' source code may be stolen when they access a malicious web site### Summary Source code may be stolen when you access a malicious web site. ### Details Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject `<script src="http://localhost:8080/main.js">` 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. ### PoC 1. Down
  • < 5.2.1
GitHub (opens in a new tab)
GHSA-9jgg-88mc-972hModeratewebpack-dev-server users' source code may be stolen when they access a malicious web site with non-Chromium based browser### Summary Source code may be stolen when you access a malicious web site with non-Chromium based browser. ### Details The `Origin` header is checked to prevent Cross-site WebSocket hijacking from happening which was reported by CVE-2018-14732. But webpack-dev-server always allows IP address `Origin` headers. https://github.com/webpack/webpack-dev-server/blob/55220a800ba4e30dbde2d98785ecf4c80b32f711/lib/Server.js#L3113-L3127 This allows websites that are served on IP addresses to connect WebSocket. By using the same method described in [the article](https://blog.cal1.cn/post/Sniffing%20Codes
  • < 5.2.1
GitHub (opens in a new tab)
GHSA-cf66-xwfp-gvc4HighMissing Origin Validation in webpack-dev-serverVersions of `webpack-dev-server` before 3.1.10 are missing origin validation on the websocket server. This vulnerability allows a remote attacker to steal a developer's source code because the origin of requests to the websocket server that is used for Hot Module Replacement (HMR) are not validated. ## Recommendation For `webpack-dev-server` update to version 3.1.11 or later.
  • < 3.1.11
GitHub (opens in a new tab)
  • GHSA-f5vj-f2hx-8m93Moderate
    webpack-dev-server vulnerable to cross-site request forgery via internal developer endpoints
    • < 5.2.6

    ### Impact The internal `/webpack-dev-server/open-editor` and `/webpack-dev-server/invalidate` endpoints perform state-changing actions on any `GET` request, without verifying that the request originated from the dev server's own page. Any website a developer visits while the dev server is running can trigger them cross-origin with no interaction beyond the visit. An attacker can open an arbitrary existing local file in the developer's editor, including files outside the project root (e.g. `~/.ssh/config`). The file's contents are not returned to the attacker. Repeated requests can also spaw

    CVE: CVE-2026-14620

  • GHSA-m28w-2pqf-7qgjModerate
    webpack-dev-server vulnerable to denial of service via a malformed Host or Origin header
    • < 5.2.6

    ### Impact An unauthenticated peer that can reach the `webpack-dev-server` process can terminate it by sending either a normal HTTP request with a malformed `Host` header, or a WebSocket upgrade to the default `/ws` endpoint with a malformed `Origin` header. The malformed header triggers an uncaught exception in the host-validation path and crashes the dev server process. ### Patches Fixed in `webpack-dev-server` 5.2.6 by treating malformed `Host` and `Origin` header values as invalid rather than throwing (see [PR #5699](https://github.com/webpack/webpack-dev-server/pull/5699)). ### Workar

    CVE: CVE-2026-14631

  • GHSA-mx8g-39q3-5c79Moderate
    webpack-dev-server vulnerable to HMR WebSocket interception via permissive user proxies
    • < 5.2.5

    ### Impact When a user-configured proxy on `webpack-dev-server` has a broad context (e.g. `/`) and `ws: true`, it also intercepts the dev server's own HMR WebSocket and forwards it to the proxy target. This leaks the browser's cookies and `Origin` header to the backend, bypasses the dev server's Host/Origin validation, and corrupts the HMR socket (both HMR and the proxy end up writing to the same socket). ### Patches Fixed in `webpack-dev-server` 5.2.5. ### Workarounds Scope user-defined proxy `context` to specific paths instead of `/`, or omit `ws: true` from the proxy entry when WebSock

    CVE: CVE-2026-9595

  • GHSA-79cf-xcqc-c78wModerate
    webpack-dev-server vulnerable to cross-origin source code exposure on non-HTTPS origins
    • < 5.2.4

    ### Impact When webpack-dev-server is running on a non-HTTPS origin (the default), cross-origin requests from malicious websites can load the dev server's JavaScript bundles via `<script>` tags. The fix introduced in v5.2.1 (CVE-2025-30359) relied on `Sec-Fetch-Mode` and `Sec-Fetch-Site` request headers to block these requests, but browsers only send these headers for [potentially trustworthy origins](https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy). Over plain HTTP, the headers are absent and the check is bypassed. An attacker who knows the dev server's host, port, an

    CVE: CVE-2026-6402

  • GHSA-4v9v-hfq4-rm2vModerate
    webpack-dev-server users' source code may be stolen when they access a malicious web site
    • < 5.2.1

    ### Summary Source code may be stolen when you access a malicious web site. ### Details Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject `<script src="http://localhost:8080/main.js">` 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. ### PoC 1. Down

    CVE: CVE-2025-30359

  • GHSA-9jgg-88mc-972hModerate
    webpack-dev-server users' source code may be stolen when they access a malicious web site with non-Chromium based browser
    • < 5.2.1

    ### Summary Source code may be stolen when you access a malicious web site with non-Chromium based browser. ### Details The `Origin` header is checked to prevent Cross-site WebSocket hijacking from happening which was reported by CVE-2018-14732. But webpack-dev-server always allows IP address `Origin` headers. https://github.com/webpack/webpack-dev-server/blob/55220a800ba4e30dbde2d98785ecf4c80b32f711/lib/Server.js#L3113-L3127 This allows websites that are served on IP addresses to connect WebSocket. By using the same method described in [the article](https://blog.cal1.cn/post/Sniffing%20Codes

    CVE: CVE-2025-30360

  • GHSA-cf66-xwfp-gvc4High
    Missing Origin Validation in webpack-dev-server
    • < 3.1.11

    Versions of `webpack-dev-server` before 3.1.10 are missing origin validation on the websocket server. This vulnerability allows a remote attacker to steal a developer's source code because the origin of requests to the websocket server that is used for Hot Module Replacement (HMR) are not validated. ## Recommendation For `webpack-dev-server` update to version 3.1.11 or later.

    CVE: CVE-2018-14732

Showing 1-7 of 7 vulnerabilities