Skip to main content
Vulnerability Database/CVE-2026-103921

CVE-2026-103921: GraphQL Tools Information Disclosure Flaw

CVE-2026-103921 is an information disclosure vulnerability in GraphQL Tools that allows attackers to intercept WebSocket connections and steal credentials. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-103921 Overview

CVE-2026-103921 is a certificate validation vulnerability [CWE-295] in the GraphQL Tools @graphql-tools/executor-legacy-ws package. The buildWSLegacyExecutor() function hardcodes TLS certificate rejection to off for Node.js connections to wss:// endpoints. Applications using the executor directly, or url-loader with SubscriptionProtocol.LEGACY_WS, accept attacker-controlled certificates. A network-positioned attacker can intercept the connection, disclose authentication material in connectionParams or headers, and modify subscription data. Browser WebSocket clients are not affected because browsers enforce certificate validation. The issue is fixed in version 1.1.35.

Critical Impact

A man-in-the-middle attacker can intercept legacy WebSocket subscriptions, steal authentication tokens, and tamper with subscription data because TLS certificate validation is disabled by default.

Affected Products

  • @graphql-tools/executor-legacy-ws prior to version 1.1.35
  • @graphql-tools/url-loader when configured with SubscriptionProtocol.LEGACY_WS
  • Node.js applications using buildWSLegacyExecutor() for wss:// subscriptions

Discovery Timeline

  • 2026-10-01 - CVE-2026-103921 published to NVD
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-103921

Vulnerability Analysis

The vulnerability resides in packages/executors/legacy-ws/src/index.ts. The buildWSLegacyExecutor() function creates a WebSocket client for wss:// endpoints with TLS certificate rejection hardcoded off. Node.js therefore accepts any certificate presented by the remote server, including self-signed or attacker-generated certificates.

Subscription traffic over GraphQL legacy WebSockets typically carries sensitive data. The connectionParams object commonly transports bearer tokens, API keys, or session cookies used for authenticating the subscription. HTTP headers passed to the executor can carry the same material. An attacker intercepting the connection reads these secrets in cleartext.

Beyond disclosure, the attacker proxies subscription events and can modify them in transit. Clients receive forged data believing it originated from the trusted GraphQL server. The flaw does not affect browser-based WebSocket clients because browsers enforce certificate validation independently of the library.

Root Cause

The root cause is improper certificate validation [CWE-295]. The underlying WebSocket client was instantiated with TLS verification disabled rather than defaulting to secure behavior. Developers using the library had no option to override this behavior through the public API.

Attack Vector

Exploitation requires a network-positioned attacker on the path between the Node.js GraphQL client and the subscription endpoint. The attacker presents a fraudulent TLS certificate, the client accepts it, and the attacker performs a classic man-in-the-middle intercept against the legacy WebSocket channel.

typescript
// Patch in packages/executors/legacy-ws/src/index.ts
export interface LegacyWSExecutorOpts {
  connectionParams?: Record<string, unknown> | (() => Record<string, unknown>);
  headers?: Record<string, any>;
  /**
   * Whether to reject unauthorized TLS certificates when connecting over `wss://`.
   * Defaults to `true`. Set to `false` only for trusted environments that use
   * self-signed certificates (for example local development).
   */
  rejectUnauthorized?: boolean;
}

export function buildWSLegacyExecutor(
// Source: https://github.com/ardatan/graphql-tools/commit/3831a0661514c91d99971052f983552556880402

Detection Methods for CVE-2026-103921

Indicators of Compromise

  • Node.js services negotiating wss:// subscriptions with unexpected or self-signed certificates
  • GraphQL subscription traffic traversing unexpected intermediate hops or proxies
  • Authentication tokens from connectionParams appearing in logs or replay traffic outside the expected destination

Detection Strategies

  • Audit dependency manifests for @graphql-tools/executor-legacy-ws versions earlier than 1.1.35 or @graphql-tools/url-loader using SubscriptionProtocol.LEGACY_WS.
  • Inspect runtime egress for wss:// connections from Node.js workloads and compare certificate fingerprints against expected server certificates.
  • Correlate TLS session metadata from network monitoring with the known certificate chain for GraphQL subscription endpoints.

Monitoring Recommendations

  • Log and alert on new or unknown certificate issuers presented to Node.js GraphQL clients.
  • Monitor outbound WebSocket connections for unexpected destination IPs, especially where DNS resolution has recently changed.
  • Rotate and invalidate any bearer tokens, API keys, or session cookies that were sent through connectionParams or headers while the vulnerable version was in use.

How to Mitigate CVE-2026-103921

Immediate Actions Required

  • Upgrade @graphql-tools/executor-legacy-ws to version 1.1.35 or later across all Node.js services.
  • Rotate credentials previously transmitted through legacy WebSocket connectionParams or headers.
  • Where feasible, migrate from SubscriptionProtocol.LEGACY_WS to the modern graphql-ws protocol.

Patch Information

The fix is published in @graphql-tools/executor-legacy-ws@1.1.35. The patch introduces a new rejectUnauthorized option that defaults to true, restoring standard TLS certificate validation. The same option is exposed through @graphql-tools/url-loader for LEGACY_WS subscriptions. See the GitHub Security Advisory GHSA-6fw5-9hq8-w87g, the GitHub Pull Request, and the GraphQL Tools Release Note.

Workarounds

  • Restrict Node.js GraphQL clients to trusted networks until the upgrade is applied.
  • Terminate wss:// subscriptions behind a reverse proxy that enforces certificate pinning for the upstream GraphQL server.
  • Avoid passing long-lived secrets in connectionParams or headers; prefer short-lived tokens scoped to a single subscription session.
bash
# Upgrade to the patched release
npm install @graphql-tools/executor-legacy-ws@^1.1.35

# Verify installed version
npm ls @graphql-tools/executor-legacy-ws

# When using url-loader with LEGACY_WS, explicitly set the option
# rejectUnauthorized: true  (default in 1.1.35+)

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.