Missing Origin Validation in WebSockets Affecting @fastify/http-proxy package, versions >=7.1.0 <11.6.10


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.12% (3rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-FASTIFYHTTPPROXY-22743513
  • published23 Nov 2026
  • disclosed19 Nov 2026
  • creditRootSys Research

Introduced: 19 Nov 2026

NewCVE-2026-133111  (opens in a new tab)
CWE-1385  (opens in a new tab)

How to fix?

Upgrade @fastify/http-proxy to version 11.6.10 or higher.

Overview

@fastify/http-proxy is a proxy http requests, for Fastify

Affected versions of this package are vulnerable to Missing Origin Validation in WebSockets via the default rewriteRequestHeaders implementation in the WebSocket proxy path, which forwards the client's Cookie header to the upstream but drops the browser's Origin header. Because the plugin never sets the ws origin option, upstream WebSocket servers that defend against cross-site hijacking by checking Origin receive no origin value and treat the connection as a trusted non-browser client, bypassing their origin check entirely. A malicious page visited by a logged-in user can open a WebSocket through the proxy to an upstream that authenticates with a cookie, and read or send messages on the user's behalf.

Note: This is only exploitable when websocket: true is used with the default rewriteRequestHeaders (or a custom one that does not add Origin), in front of an upstream that relies on Origin and accepts a missing value, and when the browser attaches the cookie to the handshake (a SameSite=None cookie from any site, or any cookie from a same-site origin such as a sibling subdomain).

Workaround

Forward the client's Origin from a custom rewriteRequestHeaders, for example rewriteRequestHeaders: (headers, request) => ({ ...headers, cookie: request.headers.cookie, origin: request.headers.origin }) in wsClientOptions. Alternatively, configure the upstream to reject WebSocket handshakes that carry no Origin header.

CVSS Base Scores

version 4.0
version 3.1