CVE-2026-9595: Webpack dev server Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-mx8g-39q3-5c79
CVSS 5.3
CWE-441 CWE-346
Published
Advisory Summary

CVE-2026-9595 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-441: Unintended Proxy or Intermediary ('Confused Deputy')) affecting Webpack dev server libraries in the npm ecosystem. The issue involves webpack-dev-server vulnerable to hmr websocket interception via permissive user proxies. Remediation is available by upgrading affected packages to version 5.2.5.

CVE-2026-9595 at a Glance

CVE Identifier CVE-2026-9595
GHSA Identifier GHSA-mx8g-39q3-5c79
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-441: Unintended Proxy or Intermediary ('Confused Deputy')
Affected Product Webpack dev server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-9595

To remediate this vulnerability, upgrade all affected Webpack dev server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

webpack-dev-server fixed: 5.2.5
npm install webpack-dev-server@5.2.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls webpack-dev-server

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-9595, inspect your project dependencies using npm:

npm ls webpack-dev-server

Analyze the terminal output to locate any version of Webpack dev server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.5), your application is affected.

Note: The npm ls webpack-dev-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-441: Unintended Proxy or Intermediary ('Confused Deputy'), where the product receives a request, message, or directive from an upstream component, but the product does not sufficiently preserve the original source of the request before forwarding the request to an external actor that is outside of the product's control sphere. this causes the product to appear to be the source of the request, leading it to act as a proxy or other intermediary between the upstream component and the external actor. In Webpack dev server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 WebSocket forwarding is not required.

CVE-2026-9595 Affected Webpack dev server Versions

1 component(s)
Fixed Versions:
5.2.5
Product / Package Ecosystem Affected Versions Fixed Version
webpack-dev-server
npm
< 5.2.5
5.2.5

References

Frequently Asked Questions

What is CVE-2026-9595?
CVE-2026-9595 is a security vulnerability in Webpack dev server involving webpack-dev-server vulnerable to HMR WebSocket interception via permissive user proxies under CWE-441: Unintended Proxy or Intermediary ('Confused Deputy').
Which Webpack dev server versions are affected?
Affected versions include releases prior to 5.2.5 across affected packages: webpack-dev-server.
What version fixes CVE-2026-9595?
Upgrading to 5.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is webpack-dev-server affected?
Yes, webpack-dev-server is affected in releases prior to 5.2.5. Upgrade your dependency to 5.2.5 or later.
What is the CVSS score of CVE-2026-9595?
CVE-2026-9595 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-9595?
CVE-2026-9595 is classified under CWE-441: Unintended Proxy or Intermediary ('Confused Deputy') (The product receives a request, message, or directive from an upstream component, but the product does not sufficiently preserve the original source of the request before forwarding the request to an external actor that is outside of the product's control sphere. This causes the product to appear to be the source of the request, leading it to act as a proxy or other intermediary between the upstream component and the external actor.).
How can I check npm dependencies for CVE-2026-9595?
Run the dependency tree command: 'npm ls webpack-dev-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mx8g-39q3-5c79",
  "modified" : "2026-06-17T18:13:32Z",
  "published" : "2026-06-17T18:13:31Z",
  "aliases" : [ "CVE-2026-9595" ],
  "summary" : "webpack-dev-server vulnerable to HMR WebSocket interception via permissive user proxies",
  "details" : "### Impact\n\nWhen 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).\n\n### Patches\n\nFixed in `webpack-dev-server` 5.2.5.\n\n### Workarounds\n\nScope user-defined proxy `context` to specific paths instead of `/`, or omit `ws: true` from the proxy entry when WebSocket forwarding is not required.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "webpack-dev-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-mx8g-39q3-5c79"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-9595"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/facebook/create-react-app/pull/7444"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-server/pull/4316"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vuejs/vue-cli/commit/72ba7505aff2a8314e82aa5082379a77504a1fcb"
  }, {
    "type" : "WEB",
    "url" : "https://cna.openjsf.org/security-advisories.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/webpack/webpack-dev-server"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-346", "CWE-441" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-17T18:13:31Z",
    "nvd_published_at" : "2026-06-15T16:16:35Z"
  }
}