Description
Impact: @fastify/http-proxy versions from 9.4.0 up to and including 11.5.0 fail to validate the resolved WebSocket destination path against the configured rewrite prefix. The WebSocket routing path in WebSocketProxy.findUpstream resolves the destination via the WHATWG URL constructor, which collapses dot segments, so a crafted upgrade request with path traversal sequences can escape the rewrite prefix and reach upstream endpoints that were not meant to be exposed by the proxy. This is a variant of CVE-2021-21322 in a code path that never went through the HTTP fix in fastify/reply-from. Exploitation requires a non-normalizing WebSocket client, since browsers and the ws package normalize the request path before sending, but raw HTTP clients or downstream proxies that forward the request target unchanged make the attack reachable in production topologies.

Patches: upgrade to @fastify/http-proxy 11.6.0.

Workarounds: none.
Published: 2026-07-18
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in @fastify/http‑proxy versions 9.4.0 through 11.5.0, where the WebSocket proxy does not validate the resolved destination path against the configured rewrite prefix. The path resolution uses the WHATWG URL constructor, which collapses dot segments, allowing a crafted WebSocket upgrade request containing traversal sequences to escape the intended prefix. This results in requests being forwarded to upstream endpoints that were not intended for exposure. The flaw is a variant of CVE‑2021‑21322 but operates in a code path that never applied the HTTP‑specific fix in fastify/reply‑from. As a result, an attacker can potentially direct the proxy to any reachable upstream service using a non‑normalizing WebSocket client, enabling unauthorized data access or malicious control of downstream services.

Affected Systems

Any Node.js application that incorporates @fastify/http‑proxy in versions 9.4.0 to 11.5.0 is affected. The vulnerability applies to the entire @fastify/http‑proxy package used as a Fastify plugin or standalone HTTP WebSocket proxy.

Risk and Exploitability

The CVSS score is 8.7, indicating a high severity. The EPSS score is below 1 %, suggesting low probability of exploitation in the wild, although it is not zero. The vulnerability is not listed in CISA's KEV catalog. Exploitation requires a WebSocket client or proxy that does not normalize the request path, so browsers and the standard ws package are not susceptible. However, raw HTTP clients or downstream proxies that forward the original path can enable the attack in production environments. Overall, the risk is significant for exposed WebSocket proxy deployments, but the attack window is limited by the need for a non‑normalizing client or an untrusted network path.

Generated by OpenCVE AI on July 30, 2026 at 23:11 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to @fastify/http-proxy version 11.6.0 or later, which contains the fix for the path traversal issue.
  • Review application logs to confirm that no requests are being forwarded to unexpected upstream targets.
  • Restrict WebSocket upgrade requests to trusted clients or use additional filtering to ensure that only intended paths reach the upstream services.

Generated by OpenCVE AI on July 30, 2026 at 23:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 28 Jul 2026 21:00:00 +0000

Type Values Removed Values Added
First Time appeared Fastify
Fastify fastify-http-proxy
Vendors & Products Fastify
Fastify fastify-http-proxy

Mon, 20 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sat, 18 Jul 2026 13:00:00 +0000

Type Values Removed Values Added
Description Impact: @fastify/http-proxy versions from 9.4.0 up to and including 11.5.0 fail to validate the resolved WebSocket destination path against the configured rewrite prefix. The WebSocket routing path in WebSocketProxy.findUpstream resolves the destination via the WHATWG URL constructor, which collapses dot segments, so a crafted upgrade request with path traversal sequences can escape the rewrite prefix and reach upstream endpoints that were not meant to be exposed by the proxy. This is a variant of CVE-2021-21322 in a code path that never went through the HTTP fix in fastify/reply-from. Exploitation requires a non-normalizing WebSocket client, since browsers and the ws package normalize the request path before sending, but raw HTTP clients or downstream proxies that forward the request target unchanged make the attack reachable in production topologies. Patches: upgrade to @fastify/http-proxy 11.6.0. Workarounds: none.
Title @fastify/http-proxy vulnerable to prefix escape via WebSocket path traversal
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 8.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N'}


Subscriptions

Fastify Fastify-http-proxy
cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-07-20T15:15:21.351Z

Reserved: 2026-07-13T17:46:07.876Z

Link: CVE-2026-15631

cve-icon Vulnrichment

Updated: 2026-07-20T15:15:16.108Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T23:15:06Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')