Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/graph-gophers/graphql-go
  4. ›
  5. CVE-2022-21708

CVE-2022-21708: Denial of Service in github.com/graph-gophers/graphql-go

January 27, 2022

graphql-go is a GraphQL server with a focus on ease of use. 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.

References

  • github.com/advisories/GHSA-mh3m-8c74-74xh
  • github.com/graph-gophers/graphql-go/commit/eae31ca73eb3473c544710955d1dbebc22605bfe
  • github.com/graph-gophers/graphql-go/security/advisories/GHSA-mh3m-8c74-74xh
  • nvd.nist.gov/vuln/detail/CVE-2022-21708

Code Behaviors & Features

Detect and mitigate CVE-2022-21708 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.3.0

Fixed versions

  • v1.3.0

Solution

Upgrade to version 1.3.0 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Source file

go/github.com/graph-gophers/graphql-go/CVE-2022-21708.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:08 +0000.