WizがGoogle Cloudに参加:共に魔法を作り出す

CVE-2026-140102: 
JavaScript 脆弱性分析と緩和策

概要

CVE-2026-140102 is a Denial of Service vulnerability in http-proxy-middleware, a widely used Node.js HTTP proxy middleware package. When ws: true is enabled, an HTTP Upgrade request whose path does not match the configured pathFilter leaves the raw socket without an error listener attached. A remote unauthenticated attacker can exploit this by sending such a crafted Upgrade request and then resetting the TCP connection, triggering an unhandled ECONNRESET error that terminates the entire gateway Node.js process — even when on.error, server.on('error'), and server.on('clientError') callbacks are configured. Affected versions span from 0.8.0 up to (but not including) 2.0.12, 3.0.11, and 4.2.2. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).

技術的詳細

The root cause is classified as CWE-248 (Uncaught Exception): when the middleware's handleUpgrade function processes an Upgrade request whose path does not match pathFilter, it returns early without attaching an error listener to the raw TCP socket. This means any subsequent socket-level error (such as an ECONNRESET from a TCP RST) is emitted as an unhandled Node.js 'error' event, which by default throws and crashes the process. The fix, implemented in PRs #1328, #1329, and #1330, introduces a guardUpgradeSocket() helper that attaches a temporary error listener to every upgrade socket — matched or unmatched — before path filtering occurs, and removes it only after httpxy installs its own listener upon a successful matched upgrade (GitHub Advisory, Fix PR #1330). Exploitation requires no authentication and no user interaction; the only preconditions are that the target server uses http-proxy-middleware with ws: true, forwards 'upgrade' events to proxy.upgrade, and is reachable over the network on its listening port.

影響

Successful exploitation results in a complete crash of the Node.js gateway process, causing a full denial of service for all clients relying on that gateway. There is no confidentiality or integrity impact — the vulnerability is purely an availability issue. Because a single crafted request is sufficient to terminate the process, an attacker can repeatedly crash the service, preventing recovery without process supervision or automatic restart mechanisms in place (GitHub Advisory).

利用可能性

A public proof-of-concept (PoC) exploit is available in the GitHub Security Advisory, consisting of a short Node.js client script that opens a raw TCP connection, sends a crafted HTTP Upgrade request to a non-matching path, and calls socket.resetAndDestroy() after 100 ms to trigger the crash (GitHub Advisory). The exploit requires no authentication, no privileges, and no user interaction, making it trivially weaponizable. As of the time of disclosure, there is no evidence of in-the-wild exploitation, no known threat actor attribution, and the EPSS score is reported as 0.0. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.

エクスプロイテーションのステップ

  1. Identify a target: Locate a Node.js application using http-proxy-middleware (versions >= 0.8.0, < 2.0.12 / 3.0.11 / 4.2.2) with ws: true enabled and server.on('upgrade', proxy.upgrade) configured. The server must be reachable over the network.
  2. Open a raw TCP connection: Using Node.js net.connect() or a raw socket tool, establish a TCP connection to the gateway's listening port (e.g., net.connect(5056, '127.0.0.1', ...)).
  3. Send a crafted HTTP Upgrade request to a non-matching path: Write an HTTP/1.1 Upgrade request targeting a path that does NOT match the server's pathFilter (e.g., GET / when pathFilter is /ws):
    GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: Upgrade\r\nUpgrade: websocket\r\n\r\n
  4. Reset the TCP connection: After a short delay (e.g., 100 ms), send a TCP RST by calling socket.resetAndDestroy(). This causes the server-side socket — which has no error listener attached — to emit an unhandled ECONNRESET error.
  5. Gateway process crashes: The Node.js process throws the unhandled 'error' event and terminates, producing output similar to:
    Error: read ECONNRESET
      at TCP.onStreamRead (node:internal/stream_base_commons:221:20)
    Emitted 'error' event on Socket instance ...
    throw er; // Unhandled 'error' event
    The entire gateway is now unavailable until restarted (GitHub Advisory).

妥協の兆候

  • Network: Unexpected HTTP Upgrade requests (with Connection: Upgrade and Upgrade: websocket headers) targeting paths that do not match the application's configured WebSocket route (e.g., GET / instead of GET /ws); TCP RST packets from external clients shortly after sending an Upgrade request.
  • Logs: Node.js process crash logs containing Error: read ECONNRESET and Emitted 'error' event on Socket instance; gateway process exit events logged by a process manager (e.g., PM2, systemd) indicating unexpected restarts.
  • Process: Sudden termination of the Node.js gateway process followed by automatic restart; repeated process restarts in a short time window suggesting a sustained DoS attack.
  • Application: Increased frequency of gateway downtime or service interruptions correlated with inbound WebSocket Upgrade requests to non-proxied paths (GitHub Advisory).

緩和策と回避策

Upgrade http-proxy-middleware to one of the patched versions: 2.0.12, 3.0.11, or 4.2.2, depending on the currently deployed major version branch. The fix hardens the handleUpgrade function by attaching a temporary error listener to every upgrade socket before path filtering, preventing unhandled ECONNRESET errors from crashing the process (Fix PR #1328, Fix PR #1329, Fix PR #1330). As a short-term workaround prior to patching, consider placing a network-level firewall or reverse proxy (e.g., nginx) in front of the gateway to filter or rate-limit unexpected Upgrade requests, and ensure a process supervisor (PM2, systemd) is configured to automatically restart the gateway on crash.

コミュニティの反応

The vulnerability was reported by security researcher samuel871211 with AI-assisted code analysis (Claude Code) and was published as a GitHub Security Advisory on November 22, 2026. The maintainer (chimurai) merged fixes across all three active branches on November 15, 2026 — prior to the public advisory — indicating a coordinated disclosure process. The advisory notes that AI assistance was used for code analysis, PoC drafting, and report writing, with the researcher manually verifying all findings (GitHub Advisory). Coverage appeared on automated vulnerability tracking platforms shortly after NVD publication, with no significant broader media or community discussion identified at the time of this report.

追加リソース


ソース: この報告書はAIを用いて作成されました

関連 JavaScript 脆弱性:

CVE ID

重大度

スコア

テクノロジー

コンポーネント名

CISA KEVのエクスプロイト

修正あり

出版日

CVE-2026-140097CRITICAL9.1
  • JavaScript logoJavaScript
  • vite
いいえはいNov 30, 2026
CVE-2026-140010HIGH8.7
  • JavaScript logoJavaScript
  • html-minifier
いいえはいNov 30, 2026
CVE-2026-140008HIGH8.7
  • JavaScript logoJavaScript
  • minimatch
いいえはいNov 30, 2026
CVE-2026-140102HIGH7.5
  • JavaScript logoJavaScript
  • http-proxy-middleware
いいえいいえNov 30, 2026
CVE-2026-140103MEDIUM5.4
  • JavaScript logoJavaScript
  • http-proxy-middleware
いいえはいNov 30, 2026

無料脆弱性評価

クラウドセキュリティの姿勢をベンチマークしましょう

9つのセキュリティ領域にわたるクラウドセキュリティの実践を評価し、リスクレベルをベンチマークし、防御のギャップを特定しましょう。

評価のリクエスト

Wizのその他のリソース

パーソナライズされたデモを見る

実際に Wiz を見てみませんか?​

"私が今まで見た中で最高のユーザーエクスペリエンスは、クラウドワークロードを完全に可視化します。"
デビッド・エストリックCISO (最高情報責任者)
"Wiz を使えば、クラウド環境で何が起こっているかを 1 つの画面で確認することができます"
アダム・フレッチャーチーフ・セキュリティ・オフィサー
"Wizが何かを重要視した場合、それは実際に重要であることを私たちは知っています。"
グレッグ・ポニャトフスキ脅威および脆弱性管理責任者