/

CVE-2026-103921

Severity:

HIGH RISK

(7.4)

Improper Certificate Validation (CWE-295) in GraphQL Tools

CVE-2026-103921

Awaiting Analysis

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Man-in-the-Middle Disclosure and Data Manipulation

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

GraphQL Tools can disable TLS certificate verification for legacy WebSocket connections to wss:// endpoints. When an application uses the affected executor directly or relies on the legacy WebSocket subscription protocol, a network-positioned attacker may intercept the connection, disclose authentication material, or alter subscription data.

Affected context

The issue occurs in applications using GraphQL Tools' legacy WebSocket executor for secure WebSocket connections. It becomes risky when certificate validation is disabled and an attacker can position themselves between the application and the intended wss:// service. Browser-based WebSocket clients are generally not affected because browsers enforce certificate validation independently.

Exploit preconditions

  • Attack surface: Node.js connections created through the legacy WebSocket executor or compatible URL-loading paths
  • Required access: Network positioning sufficient to intercept or interfere with the TLS connection
  • Trigger point: Establishment of a legacy WebSocket connection to a wss:// endpoint
  • Why exploitation is possible: The client does not properly reject an untrusted server certificate, allowing an intercepted connection to appear valid to the application

Why this happens

The underlying bug is improper certificate validation, mapped to CWE-295. The legacy WebSocket connection logic hardcodes TLS certificate rejection off, causing the client to accept certificates that should fail trust or hostname verification. This weakens the authentication property of TLS and permits an intermediary to impersonate the intended endpoint.

Potential impact

  • Authentication tokens or other connection parameters may be disclosed
  • Request headers containing sensitive credentials could be exposed
  • Subscription messages or returned data could be modified
  • An attacker could impersonate the GraphQL service
  • Application behavior or downstream data processing could be influenced

General mitigation guidance

Mitigation should center on preserving end-to-end TLS certificate validation for all secure WebSocket connections.

Common defensive patterns include:

  • Use WebSocket clients and connection options that verify certificates by default
  • Avoid disabling certificate rejection or hostname verification in production
  • Prefer maintained subscription protocols with secure, standards-based transport behavior
  • Reduce the sensitivity and lifetime of credentials placed in connection parameters or headers
  • Apply least privilege to tokens used by GraphQL clients
  • Use network controls that limit unauthorized interception and endpoint substitution
  • Ensure secure transport settings cannot be overridden by untrusted configuration

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis for disabled certificate verification, insecure TLS options, or certificate-rejection overrides
  • Code review checks covering WebSocket client construction and transport configuration
  • Dependency and configuration policies that prohibit insecure TLS settings in production
  • Integration tests that verify invalid, expired, and hostname-mismatched certificates are rejected
  • Network monitoring for unexpected WebSocket destinations, certificate changes, or TLS interception indicators

Automated dependency and code review tools may help identify affected usage patterns and insecure transport configuration.

Sources

SourceLink
github.comgithub.com/ardatan/graphql-tools/commit/3831a0661514c91d99971052f983552556880402
github.comgithub.com/ardatan/graphql-tools/pull/8426
github.comgithub.com/ardatan/graphql-tools/releases/tag/@graphql-tools/executor-legacy-ws@1.1.35
github.comgithub.com/ardatan/graphql-tools/security/advisories/GHSA-6fw5-9hq8-w87g

Frequently asked

questions

It may be exploitable by a network-positioned attacker who can intercept or redirect the affected Node.js WebSocket connection. It is not generally exploitable through a GraphQL request alone.

The attacker typically needs a position on the network path or another capability to interfere with the TLS connection. Access to the application's GraphQL account is not necessarily required.

Ensure that secure WebSocket clients always perform certificate and hostname validation, and avoid transport configurations that disable TLS verification.

Enforce secure-by-default transport policies, test certificate rejection behavior, review WebSocket connection options, minimize credential exposure, and use least-privilege authentication tokens.

Find out what's already
exploitable in your codebase.