CVE-2026-35523: strawberry-graphql Authentication Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-vpwc-v33q-mq89
CVSS 7.5
CWE-306
Published
Advisory Summary

CVE-2026-35523 is a HIGH (CVSS 7.5) authentication bypass vulnerability (CWE-306: Missing Authentication for Critical Function) affecting strawberry-graphql libraries in the PyPI ecosystem. The issue involves authentication bypass via legacy graphql-ws websocket subprotocol. Remediation is available by upgrading affected packages to version 0.312.3.

CVE-2026-35523 at a Glance

CVE Identifier CVE-2026-35523
GHSA Identifier GHSA-vpwc-v33q-mq89
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-306: Missing Authentication for Critical Function
Affected Product strawberry-graphql
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-35523

To remediate this vulnerability, upgrade all affected strawberry-graphql dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

strawberry-graphql fixed: 0.312.3
pip install strawberry-graphql>=0.312.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show strawberry-graphql

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-35523, inspect your installed packages using pip:

pip show strawberry-graphql

Analyze the terminal output to locate any version of strawberry-graphql in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.312.3), your application is affected.

Note: The pip show strawberry-graphql command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. In strawberry-graphql, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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`. The graphql-transport-ws subprotocol handler is not affected, as it correctly gates subscription operations on a connection_acknowledged flag. However, both subprotocols are enabled by default in all framework integrations that support websockets, and the subprotocol is selected by the client via the Sec-WebSocket-Protocol header. Any application relying on `on_ws_connect` for authentication or authorization is affected. Mitigation: Upgrade to the patched version, or explicitly disable the legacy graphql-ws subprotocol by setting `subscription_protocols=[GRAPHQL_TRANSPORT_WS_PROTOCOL]` on your GraphQL view/router.

CVE-2026-35523 Affected strawberry-graphql Versions

1 component(s)
Fixed Versions:
0.312.3
Product / Package Ecosystem Affected Versions Fixed Version
strawberry-graphql
PyPI
< 0.312.3
0.312.3

References

Frequently Asked Questions

What is CVE-2026-35523?
CVE-2026-35523 is a security vulnerability in strawberry-graphql involving Authentication bypass via legacy graphql-ws WebSocket subprotocol under CWE-306: Missing Authentication for Critical Function.
Which strawberry-graphql versions are affected?
Affected versions include releases prior to 0.312.3 across affected packages: strawberry-graphql.
What version fixes CVE-2026-35523?
Upgrading to 0.312.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is strawberry-graphql affected?
Yes, strawberry-graphql is affected in releases prior to 0.312.3. Upgrade your dependency to 0.312.3 or later.
What is the CVSS score of CVE-2026-35523?
CVE-2026-35523 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-35523?
CVE-2026-35523 is classified under CWE-306: Missing Authentication for Critical Function (The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.).
How can I check PyPI dependencies for CVE-2026-35523?
Run the dependency tree command: 'pip show strawberry-graphql'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vpwc-v33q-mq89",
  "modified" : "2026-06-08T19:50:52Z",
  "published" : "2026-04-06T18:00:26Z",
  "aliases" : [ "CVE-2026-35523" ],
  "summary" : "strawberry-graphql: Authentication bypass via legacy graphql-ws WebSocket subprotocol",
  "details" : "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`.\n\nThe graphql-transport-ws subprotocol handler is not affected, as it correctly gates subscription operations on a connection_acknowledged flag. However, both subprotocols are enabled by default in all framework integrations that support websockets, and the subprotocol is selected by the client via the Sec-WebSocket-Protocol header.\n\nAny application relying on `on_ws_connect` for authentication or authorization is affected.\n\nMitigation: Upgrade to the patched version, or explicitly disable the legacy graphql-ws subprotocol by setting `subscription_protocols=[GRAPHQL_TRANSPORT_WS_PROTOCOL]` on your GraphQL view/router.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "strawberry-graphql"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.312.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.312.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/strawberry-graphql/strawberry/security/advisories/GHSA-vpwc-v33q-mq89"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35523"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strawberry-graphql/strawberry/commit/0977a4e6b41b7cfe3e9d8ba84a43458a2b0c54c2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/strawberry-graphql/PYSEC-2026-133.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strawberry-graphql/strawberry"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strawberry-graphql/strawberry/releases/tag/0.312.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-306" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-06T18:00:26Z",
    "nvd_published_at" : "2026-04-07T17:16:31Z"
  }
}