webpack-dev-server vulnerable to HMR WebSocket interception via permissive user proxies
Moderate severity
GitHub Reviewed
Published
Jun 15, 2026
in
webpack/webpack-dev-server
•
Updated Jun 17, 2026
Description
Published by the National Vulnerability Database
Jun 15, 2026
Published to the GitHub Advisory Database
Jun 17, 2026
Reviewed
Jun 17, 2026
Last updated
Jun 17, 2026
Impact
When a user-configured proxy on
webpack-dev-serverhas a broad context (e.g./) andws: true, it also intercepts the dev server's own HMR WebSocket and forwards it to the proxy target. This leaks the browser's cookies andOriginheader 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-server5.2.5.Workarounds
Scope user-defined proxy
contextto specific paths instead of/, or omitws: truefrom the proxy entry when WebSocket forwarding is not required.References