Skip to main content

webpack-dev-server CVE-2026-9595

| EUVDEUVD-2026-36729 MEDIUM
Origin Validation Error (CWE-346)
2026-06-15 openjs GHSA-mx8g-39q3-5c79
4.3
CVSS 3.1 · NVD
Share

Severity by source

Vendor (openjs) PRIMARY
MEDIUM
qualitative
NVD
4.3 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
vuln.today AI
7.3 HIGH

Cookie leakage and Origin bypass warrant C:L and I:L; AV:N and PR:N apply since no local access or authentication is required once the misconfiguration is present.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
SUSE
MEDIUM
qualitative
Red Hat
7.1 HIGH
qualitative

Primary rating from Vendor (openjs).

CVSS VectorNVD

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

4
CVSS changed
Jun 16, 2026 - 17:37 NVD
5.3 (MEDIUM) 4.3 (MEDIUM)
Patch available
Jun 15, 2026 - 17:01 EUVD
Source Code Evidence Fetched
Jun 15, 2026 - 16:34 vuln.today
Analysis Generated
Jun 15, 2026 - 16:34 vuln.today

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 8 npm packages depend on webpack-dev-server (6 direct, 2 indirect)

Ecosystem-wide dependent count for version 5.2.5.

DescriptionNVD

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.

AnalysisAI

webpack-dev-server's WebSocket upgrade handler, when a proxy entry is configured with a broad path context (/) and ws: true, incorrectly forwards the dev server's own HMR WebSocket upgrade requests to the configured proxy backend. This unintentionally delivers browser cookies and the Origin header to the proxy target, bypasses the dev server's built-in Host/Origin validation, and corrupts the HMR channel by routing both HMR and proxy traffic over the same socket. No public exploit identified at time of analysis, though the affected configuration pattern is common in development setups; a vendor-released patch is available in version 5.2.5.

Technical ContextAI

webpack-dev-server (CPE: cpe:2.3:a:webpack-dev-server:webpack-dev-server:*:*:*:*:*:*:*:*) is a Node.js development HTTP server providing Hot Module Replacement (HMR) via a persistent WebSocket connection on a configurable path (defaulting to /ws). HTTP-to-WebSocket upgrades are handled by listening to the 'upgrade' event on the underlying Node.js HTTP server. Pre-fix, the proxy integration registered a generic upgrade handler (proxyUpgrade) that processed all incoming upgrade requests without first checking whether the request URL matched the internal HMR WebSocket path. When a developer configures a proxy entry with context '/' and ws: true, this handler captures HMR upgrade requests and forwards them to the external proxy target. The root cause is CWE-346 (Origin Validation Error): the server failed to maintain proper separation between its own internal WebSocket endpoint and developer-configured proxy WebSocket forwarding. The fix in PR #4316 adds an explicit pathname guard - extracting the configured HMR path and returning early from the upgrade handler if the incoming request URL matches it. Equivalent mitigations were applied in downstream toolchains: Vue CLI (commit 72ba7505) and create-react-app (PR #7444) both patched their proxy helpers to exclude the HMR sockjs-node endpoint from broad proxy matching, confirming this anti-pattern spanned the wider webpack ecosystem.

RemediationAI

Upgrade to webpack-dev-server 5.2.5, which is the vendor-released patch confirmed by the OpenJS Foundation CNA advisory at https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-mx8g-39q3-5c79 and implemented in https://github.com/webpack/webpack-dev-server/pull/4316. If an immediate upgrade is not feasible, two workarounds are available. First, narrow the proxy context from the broad root path (/) to the specific API route prefixes that require proxying (e.g., /api), which prevents the proxy from capturing HMR WebSocket upgrade requests; this is the lower-risk option as it preserves WebSocket proxy functionality for application traffic. Second, remove ws: true from the proxy entry entirely if WebSocket forwarding to the backend is not required; note that this will also disable WebSocket proxying for any application-level WebSocket traffic, which may be a functional regression. Both workarounds require editing the proxy array in webpack.config.js (or the equivalent framework config file). Vue CLI users should also review the fix at https://github.com/vuejs/vue-cli/commit/72ba7505aff2a8314e82aa5082379a77504a1fcb and create-react-app users should review https://github.com/facebook/create-react-app/pull/7444 for equivalent guidance.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected

Share

CVE-2026-9595 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy