Summary
In next dev, cross-site protection for internal websocket endpoints could treat Origin: null as a bypass case even if allowedDevOrigins is configured, allowing privacy-sensitive/opaque contexts (for example sandboxed documents) to connect unexpectedly.
Impact
If a dev server is reachable from attacker-controlled content, an attacker may be able to connect to the HMR websocket channel and interact with dev websocket traffic. This affects development mode only.
Apps without a configured allowedDevOrigins still allow connections from any origin.
Patches
Fixed by validating Origin: null through the same cross-site origin-allowance checks used for other origins.
Workarounds
If upgrade is not immediately possible:
- Do not expose
next dev to untrusted networks.
- Block websocket upgrades to
/_next/webpack-hmr when Origin is null at your proxy.
Summary
In
next dev, cross-site protection for internal websocket endpoints could treatOrigin: nullas a bypass case even ifallowedDevOriginsis configured, allowing privacy-sensitive/opaque contexts (for example sandboxed documents) to connect unexpectedly.Impact
If a dev server is reachable from attacker-controlled content, an attacker may be able to connect to the HMR websocket channel and interact with dev websocket traffic. This affects development mode only.
Apps without a configured
allowedDevOriginsstill allow connections from any origin.Patches
Fixed by validating
Origin: nullthrough the same cross-site origin-allowance checks used for other origins.Workarounds
If upgrade is not immediately possible:
next devto untrusted networks./_next/webpack-hmrwhenOriginisnullat your proxy.