CVE-2022-21708
MEDIUM 6.5CVSS 3.1Denial of Service in graphql-go
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.
- Published
- 21 Jan 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-400CWE-674
- Also known as
- GHSA-mh3m-8c74-74xhGO-2022-0300
- Sources
- NVDJSONOSV GHSA-mh3m-8c74-74xhJSONOSV GO-2022-0300JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | LOW 3.5 | AV:N/AC:M/Au:S/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | graphql-go_project | graphql-gocpe:2.3:a:graphql-go_project:graphql-go:*:*:*:*:*:*:*:* |
< 1.3.0 | 1.3.0 |
| OSV | Go | github.com/graph-gophers/graphql-go | < 1.3.0 | 1.3.0 |
References
- https://github.com/graph-gophers/graphql-go/commit/eae31ca73eb3473c544710955d1dbebc22605bfe · Patch, Third Party Advisory, WEB, FIX
- https://github.com/graph-gophers/graphql-go/security/advisories/GHSA-mh3m-8c74-74xh · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-21708 · ADVISORY
- https://github.com/graph-gophers/graphql-go · PACKAGE
- https://pkg.go.dev/vuln/GO-2022-0300 · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 21 Jan 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 15 Jul 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 27 Jan 2022)