{"id":"CVE-2022-21708","aliases":["DEBIAN-CVE-2022-21708","EUVD-2022-0647","GHSA-mh3m-8c74-74xh","GO-2022-0300","UBUNTU-CVE-2022-21708"],"status":"published","title":"Denial of Service in graphql-go","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.","severity":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01243,"percentile":0.69422,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-400","CWE-674"],"published":"2022-01-21T22:25:10Z","modified":"2026-10-28T02:31:12Z","fixes":[{"ecosystem":"Go","package":"github.com/graph-gophers/graphql-go","fixed_in":["1.3.0"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"golang-github-graph-gophers-graphql-go","fixed_in":["1.3.0-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"golang-github-graph-gophers-graphql-go","fixed_in":["1.3.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"golang-github-graph-gophers-graphql-go","fixed_in":["1.3.0-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/graph-gophers/graphql-go","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"golang-github-graph-gophers-graphql-go","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.0-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"golang-github-graph-gophers-graphql-go","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"golang-github-graph-gophers-graphql-go","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.0-1"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/graph-gophers/graphql-go","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.3.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/graph-gophers/graphql-go","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.3.0"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"golang-github-graph-gophers-graphql-go","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.0~git20180609.bb97385-2"]}],"products":[{"vendor":"graph-gophers","product":"graphql-go"},{"vendor":"graphql-go_project","product":"graphql-go"}],"references":[{"url":"https://github.com/graph-gophers/graphql-go/security/advisories/GHSA-mh3m-8c74-74xh","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/graph-gophers/graphql-go/commit/eae31ca73eb3473c544710955d1dbebc22605bfe","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21708","tags":["advisory"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0300","tags":["web"]},{"url":"https://github.com/advisories/GHSA-mh3m-8c74-74xh"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21708.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-21708","tags":["advisory"]},{"url":"https://github.com/graph-gophers/graphql-go","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2022-21708","tags":["report"]},{"url":"https://github.com/graph-gophers/graphql-go/pull/492","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-21708","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2022-21708","title":"Denial of Service in graphql-go","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.","status":"published","published":"2022-01-21T22:25:10Z","modified":"2025-04-23T19:09:37.494Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:34:29.057251Z"}],"euvd":[{"id":"EUVD-2022-0647","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.","status":"published","published":"2022-01-21T22:25:10Z","modified":"2025-04-23T19:09:37Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T20:52:06.891582Z"}],"ghsa":[{"id":"GHSA-mh3m-8c74-74xh","title":"Denial of Service in graphql-go","description":"### Impact\nThis is 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. To make things worse the only mitigation in affected versions creates opportunities for other attacks. This issue is only available if you are using `graphql.MaxDepth` option in your schema (which is highly recommended in most cases).\n\n### Patches\nThe issue has been patched in version `v1.3.0`. We have been trying to maintain backwards compatibility and avoid breaking changes so upgrading should not be problematic. \n\n### Workarounds\nThe best workaround is to patch to a version greater than or equal to `v1.3.0`. \nOtherwise, the only workaround in versions prior to `v1.3.0` is to disable the `graphql.MaxDepth` option from your schema. Unfortunately, this could potentially create opportunities for other attacks.\n\n### References\nThere are no references or links. This issue was reported privately and was fixed before creating this Security Advisory.\n\n### For more information\nIf you have any questions or comments feel free to reach out to @pavelnikolov or @tony on the Gopher Slack.","status":"published","published":"2022-01-27T15:28:06Z","modified":"2023-02-09T20:06:17Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:36:44.81167Z"}],"nvd":[{"id":"CVE-2022-21708","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.","status":"published","published":"2022-01-21T23:15:08.457Z","modified":"2026-06-17T04:26:48.72Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":3.5,"vector":"AV:N/AC:M/Au:S/C:N/I:N/A:P","level":"low","assessor":"primary"}],"cwes":["CWE-400","CWE-674"],"updated_at":"2026-11-02T14:07:11.52734Z"}],"osv":[{"id":"CVE-2022-21708","title":"Denial of Service in graphql-go","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.","status":"published","published":"2022-01-21T22:25:10Z","modified":"2026-10-28T02:31:12.391363187Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:44:23.655778Z"},{"id":"DEBIAN-CVE-2022-21708","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.","status":"published","published":"2022-01-21T23:15:08.457Z","modified":"2026-11-03T08:00:37.464915784Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-03T08:25:15.646766Z"},{"id":"GHSA-mh3m-8c74-74xh","title":"Denial of Service in graphql-go","description":"### Impact\nThis is 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. To make things worse the only mitigation in affected versions creates opportunities for other attacks. This issue is only available if you are using `graphql.MaxDepth` option in your schema (which is highly recommended in most cases).\n\n### Patches\nThe issue has been patched in version `v1.3.0`. We have been trying to maintain backwards compatibility and avoid breaking changes so upgrading should not be problematic. \n\n### Workarounds\nThe best workaround is to patch to a version greater than or equal to `v1.3.0`. \nOtherwise, the only workaround in versions prior to `v1.3.0` is to disable the `graphql.MaxDepth` option from your schema. Unfortunately, this could potentially create opportunities for other attacks.\n\n### References\nThere are no references or links. This issue was reported privately and was fixed before creating this Security Advisory.\n\n### For more information\nIf you have any questions or comments feel free to reach out to @pavelnikolov or @tony on the Gopher Slack.","status":"published","published":"2022-01-27T15:28:06Z","modified":"2023-11-08T04:08:08.987087Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:46:51.811331Z"},{"id":"UBUNTU-CVE-2022-21708","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.","status":"published","published":"2022-01-21T23:15:00Z","modified":"2025-10-24T04:53:26Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T16:53:52.391598Z"},{"id":"GO-2022-0300","title":"Panic via malicious inputs in github.com/graph-gophers/graphql-go","description":"Malicious inputs can cause a panic.\n\nA maliciously crafted input can cause a stack overflow and panic. Any user with access to the GraphQL can send such a query.\n\nThis issue only occurs when using the graphql.MaxDepth schema option (which is highly recommended in most cases).","status":"published","published":"2022-07-15T23:10:20Z","modified":"2024-05-20T16:03:47Z","updated_at":"2026-11-02T15:47:00.604718Z"}]}}
