Skip to content
OpenAdvisories
Medium · 6.5 CVE-2022-21708 EUVD-2022-0647GHSA-mh3m-8c74-74xhGO-2022-0300

Denial of Service in graphql-go

Published Jan 21, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

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

VendorProductAffectedFixed
graph-gophers graphql-go < 1.3.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 golang-github-graph-gophers-graphql-go 1.3.0-1 —
Debian 13 golang-github-graph-gophers-graphql-go 1.3.0-1 —
Debian 12 golang-github-graph-gophers-graphql-go 1.3.0-1 —
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS golang-github-graph-gophers-graphql-go No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/graph-gophers/graphql-go < 1.3.0 1.3.0 GHSA-mh3m-8c74-74xh

References