CVE-2026-35523
Python vulnerability analysis and mitigation

Overview

CVE-2026-35523 is an authentication bypass vulnerability in the strawberry-graphql Python library affecting WebSocket subscription endpoints via the legacy graphql-ws subprotocol. The flaw exists in all versions up to and including 0.312.2, with version 0.312.3 containing the fix. It was published to the GitHub Advisory Database on April 6, 2026, and to the NVD on April 7, 2026. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory, Strawberry Advisory).

Technical details

The root cause is classified as CWE-306 (Missing Authentication for Critical Function). The legacy graphql-ws subprotocol handler in strawberry-graphql fails to verify that a connection_init handshake has been completed before processing start (subscription) messages. An attacker can exploit this by connecting to the WebSocket endpoint using the graphql-ws subprotocol (specified via the Sec-WebSocket-Protocol HTTP header) and immediately sending a start message without ever sending connection_init, thereby bypassing the on_ws_connect authentication hook entirely. The secure graphql-transport-ws subprotocol is not affected because it correctly gates subscription operations on a connection_acknowledged flag, but since both subprotocols are enabled by default and the client selects the protocol, any application relying on on_ws_connect for authentication is vulnerable (GitHub Advisory, Strawberry Advisory).

Impact

Successful exploitation allows an unauthenticated remote attacker to initiate GraphQL subscription operations without completing the authentication handshake, leading to unauthorized access to sensitive data exposed via those subscriptions. The impact is primarily a confidentiality breach — integrity and availability are not directly affected. Applications that use on_ws_connect as their sole authentication or authorization gate for WebSocket subscriptions are fully exposed, potentially leaking real-time business or user data to any network-accessible attacker (GitHub Advisory).

Exploitability

There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.105% (28th percentile), indicating a currently low probability of exploitation in the near term. No threat actor attribution has been reported, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. However, the attack requires no privileges, no user interaction, and is remotely exploitable over the network, making it straightforward to exploit if targeted (GitHub Advisory, Feedly).

Exploitation steps

  1. Reconnaissance: Identify internet-facing applications using strawberry-graphql version ≤ 0.312.2 with WebSocket subscriptions enabled. Look for GraphQL endpoints that accept WebSocket upgrades (e.g., /graphql or /subscriptions).
  2. Initiate WebSocket connection with legacy subprotocol: Connect to the target WebSocket endpoint, specifying the legacy subprotocol via the HTTP upgrade header: Sec-WebSocket-Protocol: graphql-ws. This bypasses the server's use of the more secure graphql-transport-ws handler.
  3. Skip connection_init: Do not send the connection_init message that would normally trigger the on_ws_connect authentication hook. The vulnerable handler does not enforce this prerequisite.
  4. Send a start message directly: Transmit a start message with a valid GraphQL subscription query payload (e.g., {"id": "1", "type": "start", "payload": {"query": "subscription { sensitiveDataFeed { field } }"}}).
  5. Receive subscription data: The server processes the subscription without authentication, streaming sensitive real-time data back to the attacker (GitHub Advisory, Strawberry Advisory).

Indicators of compromise

  • Network: WebSocket upgrade requests to GraphQL endpoints with Sec-WebSocket-Protocol: graphql-ws header from unexpected or unauthenticated clients; absence of connection_init messages in WebSocket session logs followed immediately by start messages.
  • Logs: Application or web server logs showing WebSocket connections that proceed directly to subscription operations without a preceding connection_init frame; missing or skipped invocations of the on_ws_connect handler in application-level debug logs.
  • Process/Application Behavior: Subscription data being streamed to clients that have not completed the authentication handshake; unexpected spikes in WebSocket subscription connections from unknown IP addresses.

Mitigation and workarounds

The primary remediation is to upgrade strawberry-graphql to version 0.312.3 or later, which patches the legacy graphql-ws subprotocol handler to enforce the connection_init handshake before processing subscription messages. As an immediate workaround without upgrading, explicitly disable the legacy subprotocol by setting subscription_protocols=[GRAPHQL_TRANSPORT_WS_PROTOCOL] on your GraphQL view or router, forcing all clients to use the secure graphql-transport-ws subprotocol. Applications that do not use on_ws_connect for authentication are not affected by this specific bypass but should still upgrade as a best practice (GitHub Advisory, Strawberry Advisory).

Community reactions

The advisory was published by patrick91 (a Strawberry maintainer) on April 4, 2026, with credits to bellini666 and katzj as coordinators and WesR as the finder. The vulnerability was picked up by Red Hat's security tracking and the FreeBSD ports security feed, indicating broad ecosystem awareness. No significant independent researcher commentary or major media coverage has been identified beyond standard vulnerability database aggregation (Red Hat CVE, GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-61539CRITICAL10
  • Python logoPython
  • xinference
NoYesAug 21, 2026
CVE-2026-49360HIGH7.8
  • Python logoPython
  • recce
NoYesAug 21, 2026
CVE-2026-68508HIGH7.8
  • Python logoPython
  • hydra-core
NoYesAug 21, 2026
CVE-2026-43980MEDIUM6.3
  • Python logoPython
  • malla
NoNoAug 21, 2026
CVE-2026-55468MEDIUM4.3
  • Python logoPython
  • wagtail
NoYesAug 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management