CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-9595

CVE-2026-9595: WebSocket Proxying Vulnerability in webpack-dev-server leading to Host/Origin Validation Bypass

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 17, 2026·7 min read·33 visits

Executive Summary (TL;DR)

A path parsing discrepancy between Node's URL parser and the raw string checks in the 'ws' library allows proxy middleware in webpack-dev-server to intercept local HMR WebSocket traffic. This bypasses Host/Origin security controls and leaks client cookies to proxy targets.

webpack-dev-server (WDS) is vulnerable to an Origin Validation Error (CWE-346) and a Confused Deputy vulnerability (CWE-441) due to path normalization discrepancies in its upgrade handling. When a proxy is configured with a broad context and WebSocket support is enabled, the proxy middleware intercepts internal Hot Module Replacement (HMR) WebSocket upgrade requests. This forwards the browser's credentials (such as Cookies and Origin headers) to the backend target, bypassing built-in security controls and corrupting the WebSocket connection.

Vulnerability Overview

The front-end utility webpack-dev-server (WDS) is an HTTP-based development server designed to host local web applications. It implements a Hot Module Replacement (HMR) framework to dynamically inject code updates into running applications without requiring full page refreshes. Communication between the browser client and the local compilation runner relies on a dedicated WebSocket interface. By default, this socket executes on specific local paths, such as /ws or /sockjs-node depending on the configured version.

To facilitate integration with backend components, developers often configure a local reverse proxy using the devServer.proxy directive. This proxy is powered by the http-proxy-middleware engine and runs on the same underlying HTTP server instance. When a developer creates a wildcard or broad proxy configuration (such as proxying the root path / with WebSocket support enabled via ws: true), the proxy's upgrade handlers are bound globally to the server. Without strict isolation, the proxy interceptor can hijack the internal development server's own HMR socket upgrades.

This vulnerability occurs because the pre-filter mechanism in WDS fails to reliably identify and bypass HMR requests before they are routed to the user-configured proxy. By intercepting these internal frames, WDS acts as a confused deputy. It forwards local administrative WebSocket handshake packets directly to the configured backend target. This action bypasses the Host header check and CORS validation layers built directly into WDS.

Root Cause Analysis

The root cause of this vulnerability lies in a critical path-normalization discrepancy between two software layers: the pre-filter router in webpack-dev-server and the route matcher in the underlying ws library. When a client initiates a WebSocket connection, an HTTP GET request containing Upgrade: websocket headers is dispatched to the server. The WDS middleware evaluates whether the request matches the local Hot Module Replacement path (hmrPath) to decide if it must skip proxying.

In versions prior to 5.2.5, WDS extracted the request path from the incoming message using Node.js's native URL class. This parser normalizes URL sequences. Specifically, it resolves relative path steps, collapses duplicate adjacent slashes (e.g., rewriting //ws to / under certain hostname configurations), decodes percent-encoded character sequences, and strips trailing forward slashes. This normalization behavior is standard for general web servers but differs from low-level protocol drivers.

The underlying ws WebSocket library (specifically inside its WebSocketServer#shouldHandle method) does not normalize incoming paths. Instead, it performs a strict, raw, case-sensitive comparison of the raw string stored in req.url with the query string manually stripped. It does not normalize duplicate slashes, decode percent encodings, or ignore case variants. Consequently, a request sent to //ws, /%77%73, or /WS fails the raw comparison inside ws, but is normalized to /ws by the pre-filter URL parser. This path mismatch allows malicious or deformed client requests to evade the pre-filter and get captured by the broader proxy middleware, or to trigger a dual-upgrade handler race condition.

Code Analysis and Comparison

In versions of webpack-dev-server prior to 5.2.5, the upgrade pre-filter used the standard URL constructor to parse the path. The vulnerable implementation resolved paths as follows:

// Vulnerable routing block inside lib/Server.js
const { pathname } = new URL(req.url, "http://0.0.0.0");
if (pathname === hmrPath) {
  return; // Skip proxying and let the local WebSocket server handle it
}
// If the path was modified (e.g. //ws), pathname became "/" and missed the block
proxyUpgrade(req, socket, head);

This logic causes a parsing differential. Because new URL('//ws', 'http://0.0.0.0') is parsed with ws treated as the hostname and / as the path, pathname resolves to /. Since / does not match hmrPath (which is typically /ws), the filter does not return early. Instead, the request drops down to proxyUpgrade(). However, the raw req.url is still string-matched against the proxy targets.

To address this discrepancy, the maintainers in commit 948d5e6089bebcd801dac2cbe3ed4f80b64f117a removed the URL parser entirely. They aligned the string extraction mechanism exactly with the native parsing behavior of the ws library:

// Patched upgrade handling in lib/Server.js (v5.2.5)
(this.server).on("upgrade", (req, socket, head) => {
  if (hmrPath && typeof req.url === "string") {
    // Extract the raw path prefix up to the query delimiter
    const queryIndex = req.url.indexOf("?");
    const pathname = 
      queryIndex !== -1 ? req.url.slice(0, queryIndex) : req.url;
 
    // Match the exact raw character sequence processed by the ws library
    if (pathname === hmrPath) {
      return; // Early return correctly blocks the proxy handler
    }
  }
  proxyUpgrade(req, socket, head);
});

This simple slice operation guarantees that WDS only blocks the proxy when the string matches the exact format that the ws library will accept. Any invalid or variant paths that would be ignored by ws are consistently left to the proxy, preventing dual-handling on mismatched paths.

Exploitation & Impact

An attack occurs when a client browser connects to a webpack-dev-server instance configured with a wildcard or broad proxy path, such as / with ws: true. When WDS receives a client connection attempting an upgrade to the HMR socket, the proxy middleware intercepts the HTTP handshake. Because the pre-filter parsing is bypassed, the proxy processes the upgrade and forwards the entire request payload to the designated backend server target.

This forwarding behavior creates an information disclosure vector. The proxy forwards the browser client's cookies (including HttpOnly session tokens) and the Origin header directly to the backend target. Under normal circumstances, these credentials should remain restricted to the local development server context. This allows any unauthenticated or unauthorized backend proxy target to receive credentials intended solely for the local environment.

Additionally, this bypass neutralizes the dev-server's built-in Host and Origin validation checks. These checks prevent Cross-Origin WebSocket Hijacking (COSH) and DNS rebinding attacks. Because the proxy captures the connection before the server applies validation rules, those security checks are bypassed. Finally, if the request is accepted by both the local HMR WebSocket server and the proxy middleware, both systems attempt to write handshake headers and upgrade frames to the same TCP socket. This dual-handling violates RFC 6455 and immediately corrupts the stream, leading to connection failures and development server instability.

Remediation and Mitigation

To fully resolve CVE-2026-9595, users should upgrade webpack-dev-server to version 5.2.5 or higher. This update changes the HMR path-matching logic to match the exact string processing used by the ws dependency, resolving the parsing differential.

For systems where an immediate upgrade is not feasible, developers must configure mitigation strategies to reduce exposure. The most effective mitigation is to narrow the scope of the proxy middleware's routing contexts. Wildcard contexts (such as /) should be avoided. Instead, define specific prefix paths to ensure that the proxy only captures designated backend routes:

// Remediated Proxy Configuration with restricted paths
module.exports = {
  devServer: {
    proxy: [
      {
        context: '/api',
        target: 'http://localhost:3000',
        ws: false
      }
    ]
  }
};

If the application does not rely on backend WebSocket services, the proxy's socket integration should be disabled by setting the ws parameter to false (or omitting it). This prevents the proxy from binding to the HTTP server's upgrade event emitter, blocking the attack vector.

Official Patches

webpackFix Commit implementing strict parsing checks
webpackPull Request with context for exact upgrade parsing matching

Fix Analysis (2)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS Probability
0.16%
Top 94% most exploited

Affected Systems

webpack-dev-server

Affected Versions Detail

Product
Affected Versions
Fixed Version
webpack-dev-server
webpack
< 5.2.55.2.5
AttributeDetail
CWE IDCWE-346, CWE-441
Attack VectorNetwork (AV:N)
CVSS v3.1 Score5.3 (Medium)
EPSS Score0.00163 (Percentile: 5.81%)
ImpactCredential Leakage, Host Security Bypass, Connection Corruption
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1557Adversary-in-the-Middle
Credential Access
CWE-346
Origin Validation Error

The software does not properly validate or normalizes the origin of a request, or improperly forwards transactions to downstream hosts on behalf of a client without checking validation rules.

Known Exploits & Detection

GitHub AdvisoryAdvisory documenting the proxy upgrade bypass vector and structural remediation details.

References & Sources

  • [1]CVE-2026-9595 Reference Record
  • [2]GitHub Security Advisory GHSA-mx8g-39q3-5c79
  • [3]Vue CLI Patch addressing related downstream proxy issues
  • [4]Create React App Issue addressing proxy boundaries
  • [5]OpenJS Foundation Security Advisories

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 10 hours ago•CVE-2026-58263
7.2

CVE-2026-58263: Mutation Cross-Site Scripting (mXSS) in Jodit Editor clean-html Sanitizer

CVE-2026-58263 is a high-severity Mutation Cross-Site Scripting (mXSS) vulnerability affecting Jodit Editor prior to version 4.12.28. The flaw exists in Jodit's built-in clean-html sanitizer plugin, which fails to securely parse and sanitize nested elements containing foreign namespaces like MathML and SVG. Attackers can bypass sanitization by smuggling malicious payload elements inside rawtext container tags like style inside a MathML node, leading to DOM mutation and unauthenticated arbitrary script execution in the context of the user's browser session.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 11 hours ago•CVE-2026-65841
5.3

CVE-2026-65841: Client-Side Cross-Site Scripting (XSS) via Foreign Namespace Sanitization Bypass in Jodit Editor

Jodit Editor versions prior to 4.13.6 are vulnerable to client-side Cross-Site Scripting (XSS). The clean-html plugin's sanitization routine performs case-sensitive lookups against uppercase-only element blacklists. When processing XML-based foreign namespaces such as SVG or MathML, DOM engines preserve the lowercase format of tags. Because Jodit's denyTags check fails to normalize tag casing, malicious script blocks nested inside foreign namespace elements completely bypass validation and serialize directly into the editor output.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 12 hours ago•CVE-2026-53510
8.1

CVE-2026-53510: Remote Code Execution via Dynamic WSDL Parsing in Savon Ruby SOAP Client

A critical code injection vulnerability exists in Savon, a widely used SOAP client library for Ruby, prior to version 2.17.2. The vulnerability resides within the Savon::Model.all_operations module, where operation names fetched from a target Web Services Description Language (WSDL) document are dynamically evaluated via module_eval without sanitization. An attacker capable of manipulating the target WSDL document (e.g., through Man-in-the-Middle attacks, DNS hijacking, or Server-Side Request Forgery) can execute arbitrary Ruby code in the context of the parent application process.

Alon Barad
Alon Barad
8 views•6 min read
•about 13 hours ago•CVE-2026-53466
6.5

CVE-2026-53466: Integer Conversion Overflow in ImageMagick XCF Decoder

An integer conversion overflow vulnerability exists in the XCF decoder of ImageMagick before version 6.9.13-51 and 7.1.2-26. The issue arises from mixed-type arithmetic that promotes calculation results to floating-point representations, causing an undefined cast back to integer. Under optimizing compilers, this undefined behavior results in bounds checks being bypassed, allowing out-of-bounds heap reads.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 14 hours ago•CVE-2026-53599
7.5

CVE-2026-53599: Authenticated Remote Code Execution in REDAXO CMS via Mediapool File Upload Validation Bypass

An authenticated file upload validation bypass vulnerability exists in the REDAXO CMS Mediapool addon in versions 5.18.2 through 5.21.0. Under permissive web server configurations, this allows authenticated users with media upload privileges to achieve remote code execution via multi-segment extension file uploads.

Alon Barad
Alon Barad
5 views•7 min read
•about 15 hours ago•CVE-2026-52887
10.0

CVE-2026-52887: Critical SQL Injection and Remote Code Execution in NocoBase

A critical SQL injection vulnerability exists in the @nocobase/plugin-notification-in-app-message plugin of NocoBase prior to version 2.0.61. The flaw is caused by direct string interpolation of user-controlled input into a Sequelize.literal() query, allowing authenticated users to execute stacked PostgreSQL queries and achieve remote code execution on the underlying database server.

Amit Schendel
Amit Schendel
8 views•7 min read