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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Developer configures proxy with context '/' and ws: true
  2. Delivery
    Browser connects to webpack-dev-server
  3. Exploit
    HMR client initiates WebSocket upgrade to /ws
  4. Execution
    Generic upgrade handler forwards request to proxy backend (no path exclusion check)
  5. Persist
    Proxy target receives browser cookies and Origin header
  6. Impact
    HMR socket corrupted; session credentials silently exposed to backend

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Origin validation
Exploitation Conditions

Exploitation requires two specific, co-occurring conditions in the webpack-dev-server proxy configuration: the proxy context must be set to / (or another path broad enough to prefix-match the HMR WebSocket path, typically /ws), AND ws: true must be present in the same proxy entry to enable WebSocket upgrade forwarding. Developers who scope their proxy to specific paths such as /api are not affected, as the HMR path /ws will not match the narrower context. Developers who omit ws: true from their proxy entry are also not affected, as no WebSocket upgrade forwarding occurs. Exploitation is further limited to development environments, since webpack-dev-server is not designed for production use. Once the misconfiguration is present, the leakage occurs automatically and passively whenever a browser connects and HMR initiates its WebSocket handshake - no additional attacker interaction is required beyond controlling or monitoring the configured proxy target backend.

Impact

The official CVSS base score of 5.3 with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L captures only the availability dimension (HMR socket corruption) and is in direct tension with the CVE description, which explicitly identifies browser cookie leakage (confidentiality impact) and Host/Origin validation bypass (integrity impact). Security teams should treat the official CVSS as an understatement of actual impact. No CISA KEV listing or standalone POC is present in the source data, so active exploitation is unconfirmed. Risk is structurally bounded by the development-environment context - webpack-dev-server is not intended for production deployment, meaning real-world exposure is limited to developer workstations and CI environments. However, developer sessions may carry sensitive internal credentials or tokens that could be forwarded to an attacker-controlled backend if the proxy target is not fully trusted. The specific configuration prerequisite (context '/' with ws: true) is a common scaffolded default in many project templates, elevating the realistic exposure surface. Overall priority is moderate, elevated above the official score by the unacknowledged confidentiality and integrity impacts.

Exploit ScenarioDerived

A developer runs webpack-dev-server with a proxy entry targeting an attacker-controlled or third-party backend using context '/' and ws: true - a common scaffolded configuration for full-stack development. When any browser tab opens the dev server and HMR initiates its WebSocket handshake to /ws, the upgrade handler silently forwards the request (including the browser's cookies and Origin header) to the backend proxy target instead of handling it internally. The backend receives the developer's session credentials, and the HMR channel is simultaneously corrupted, causing hot-reload to fail and potentially masking the credential leakage. No standalone POC is present in source data, but the vulnerability is trivially reproducible from the configuration described in the CVE.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 15, 2026

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.

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.

Affected VersionsENISA

webpack-dev-server 0 <5.2.5

Affected Packages

npm webpack-dev-server fix: 5.2.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when Webpack Dev Server gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (openjs) PRIMARY MEDIUM
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
Red Hat 7.1 HIGH

Primary rating from Vendor (openjs).

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

2
CVSS changed
Jun 16, 2026 - 17:37 NVD
5.3 (MEDIUM) 4.3 (MEDIUM)
Patch available
Jun 15, 2026 - 17:01 EUVD

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Threat Intel
1
1 sources
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

22
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +22
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

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