webpack-dev-server vulnerable to denial of service via a malformed Host or Origin header
Moderate severity
GitHub Reviewed
Published
Jul 3, 2026
in
webpack/webpack-dev-server
•
Updated Jul 20, 2026
Description
Published by the National Vulnerability Database
Jul 3, 2026
Published to the GitHub Advisory Database
Jul 20, 2026
Reviewed
Jul 20, 2026
Last updated
Jul 20, 2026
Impact
An unauthenticated peer that can reach the
webpack-dev-serverprocess can terminate it by sending either a normal HTTP request with a malformedHostheader, or a WebSocket upgrade to the default/wsendpoint with a malformedOriginheader. The malformed header triggers an uncaught exception in the host-validation path and crashes the dev server process.Patches
Fixed in
webpack-dev-server5.2.6 by treating malformedHostandOriginheader values as invalid rather than throwing (see PR #5699).Workarounds
Keep the dev server bound to
localhost(the default) and do not expose it to untrusted networks.References