CVE-2026-9595: webpack-dev-server vulnerable to HMR WebSocket interception via permissive user proxies

Published Jun 15, 2026
·
Updated

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.

Other sources

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.

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.

— Red Hat

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.

— MITRE

Affected Software

3 affected componentsFixes available
npm/webpack-dev-server<5.2.5
webpack.js webpack-dev-server<5.2.5
npm/webpack-dev-server<5.2.5
5.2.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/webpack-dev-server to a version that resolves this vulnerability.

    Fixed in 5.2.5
  2. Upgrade

    Upgrade webpack-dev-server to a version that resolves this vulnerability.

    Fixed in 5.2.5
  3. Configuration

    Scope the user-defined proxy `context` to specific paths instead of `/` to prevent intercepting the dev server's own HMR WebSocket.

    webpack-dev-server (proxy configuration) proxy.context = scope to specific paths instead of `/`
  4. Configuration

    If WebSocket forwarding is not required, omit `ws: true` from the proxy entry so the dev server does not forward/forward-intercept HMR WebSocket traffic.

    webpack-dev-server (proxy configuration) proxy.ws = omit/disable ws: true when not required

Event History

Jun 15, 2026
CVE Published
via MITRE·03:00 PM
Data Sourced
via MITRE·03:00 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·04:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 17, 2026
Advisory Published
via GitHub·06:13 PM
Data Sourced
via GitHub·06:13 PM
DescriptionSeverityWeaknessAffected Software
Feb 1, 58701
Event
via FIRST·05:50 PM

Frequently Asked Questions

1

What is the severity of CVE-2026-9595?

The severity of CVE-2026-9595 is medium with a score of 5.3.

2

How do I fix CVE-2026-9595?

To fix CVE-2026-9595, ensure that your proxy configuration on webpack-dev-server does not allow broad context interception.

3

What is the impact of CVE-2026-9595?

The impact of CVE-2026-9595 includes the potential leakage of browser cookies and the Origin header to the backend.

4

What software is affected by CVE-2026-9595?

CVE-2026-9595 affects the npm package webpack-dev-server.

5

How can CVE-2026-9595 affect my application?

CVE-2026-9595 can compromise your application by allowing malicious proxies to intercept sensitive data via HMR WebSocket.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203