---
id: "CVE-2026-112085"
kind: "vulnerability"
aliases: ["CVE-2026-112085"]
title: "webpack-dev-server: proxied WebSockets skip Host and Origin checks, enabling cross-origin access"
severity: "high"
cvss: 8.2
epss: 0.00147
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["developer-machines", "frontend", "node", "package", "webpack", "webpack-dev-server"]
not_affected_if: ["no-websocket-proxy", "production-only"]
published_at: "2026-10-22T10:17:08+00:00"
first_seen_at: "2026-10-23T21:57:30+00:00"
updated_at: "2026-10-25T03:03:42+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112085", "first_seen_at": "2026-10-23T21:57:30+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-112085", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# webpack-dev-server: proxied WebSockets skip Host and Origin checks, enabling cross-origin access

When a proxy entry forwards WebSockets, webpack-dev-server does not check the Host or Origin headers on those upgrade requests, so allowedHosts does not protect them. A malicious web page open in a developer's browser can open a cross-origin WebSocket through the dev server and read and write the proxied backend, even when the server is bound to loopback.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `npm ls webpack-dev-server`; versions before `5.2.7` and `6.0.0` are affected.
- Look in `webpack.config.js` or `devServer` config for `proxy` entries with `ws: true` or WebSocket forwarding enabled.

## Fix

- Upgrade webpack-dev-server to `5.2.7` or `6.1.0` or later.
- As a workaround, remove WebSocket forwarding from proxy entries that do not need it and scope proxies to specific paths.

## Timeline

- 2026-10-23T21:57:30+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-112085
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-112085

## From the sources

webpack-dev-server is a development server that provides live reloading for webpack projects. In versions before 5.2.7 and in version 6.0.0, when a proxy entry is configured to forward WebSockets, the server forwards non-HMR WebSocket upgrade requests to the proxy target without validating the Host or Origin headers, so the allowedHosts protection does not apply to those proxied upgrades. A malicious web page visited by a developer can open a cross-origin WebSocket through the dev server and read from and write to the proxied backend, even when the server is bound to loopback. The issue is fixed in webpack-dev-server 5.2.7 and 6.1.0, where proxied WebSocket upgrades pass the same Host and Origin validation as the HMR WebSocket, and users should upgrade to one of those versions or later. As a workaround, omit WebSocket forwarding from proxy entries that do not need it and scope the proxy to specific paths.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
