What’s Vulnerable › Vulnerabilities
CVE-2022-21708: Denial of Service in graphql-go
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-01-21 · updated 2026-06-17
- Weakness: CWE-400
Description
graphql-go is a GraphQL server with a focus on ease of use. In versions prior to 1.3.0 there exists a DoS vulnerability that is possible due to a bug in the library that would allow an attacker with specifically designed queries to cause stack overflow panics. Any user with access to the GraphQL handler can send these queries and cause stack overflows. This in turn could potentially compromise the ability of the server to serve data to its users. The issue has been patched in version `v1.3.0`. The only known workaround for this issue is to disable the `graphql.MaxDepth` option from your schema which is not recommended.
Affected products
- graph-gophers graphql-go: before 1.3.0 — fixed in 1.3.0
How to fix
Upgrade to a fixed version: graph-gophers graphql-go 1.3.0. Check the vendor advisory for mitigations.
References
- https://github.com/graph-gophers/graphql-go/commit/eae31ca73eb3473c544710955d1dbebc22605bfe
- https://github.com/graph-gophers/graphql-go/security/advisories/GHSA-mh3m-8c74-74xh
- https://github.com/graph-gophers/graphql-go/commit/eae31ca73eb3473c544710955d1dbebc22605bfe
- https://github.com/graph-gophers/graphql-go/security/advisories/GHSA-mh3m-8c74-74xh
Get alerted when CVE-2022-21708 or the next vulnerability affects your stack