strawberry-graphql: Denial of Service via unbounded WebSocket subscriptions
High severity
GitHub Reviewed
Published
Apr 4, 2026
in
strawberry-graphql/strawberry
•
Updated Apr 7, 2026
Description
Published to the GitHub Advisory Database
Apr 6, 2026
Reviewed
Apr 6, 2026
Published by the National Vulnerability Database
Apr 7, 2026
Last updated
Apr 7, 2026
Strawberry GraphQL's WebSocket subscription handlers for both the
graphql-transport-wsand legacygraphql-wsprotocols allocate anasyncio.Taskand associatedOperationobject for every incoming subscribe message without enforcing any limit on the number of active subscriptions per connection.An unauthenticated attacker can open a single WebSocket connection, send connection_init, and then flood subscribe messages with unique IDs. Each message unconditionally spawns a new
asyncio.Taskand async generator, causing linear memory growth and event loop saturation. This leads to server degradation or an OOM crash.References