{"answers":{"affected":"3 open source packages ship an affected version, including github.com/graph-gophers/graphql-go. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-21708 in the wild and no public exploit code.","fix":"Upgrade github.com/graph-gophers/graphql-go to 1.3.0 or later.","what":"CVE-2022-21708 is a medium-severity denial of service vulnerability in graph-gophers graphql-go, published on 21 Jan 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-21708 and fix it if it is affected.\n\nWhat it is: CVE-2022-21708 is a medium-severity denial of service vulnerability in graph-gophers graphql-go, published on 21 Jan 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-21708 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/graph-gophers/graphql-go (Go): affected all versions; fixed in 1.3.0\n- github.com/graph-gophers/graphql-go (Go): affected all versions; fixed in 1.3.0\n- github.com/graph-gophers/graphql-go (Go): affected all versions; fixed in 1.3.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-21708/ (Markdown: https://insights.sbomify.com/CVE-2022-21708/index.md)","id":"CVE-2022-21708","markdown":"https://insights.sbomify.com/CVE-2022-21708/index.md","name":"CVE-2022-21708","record":{"aliases":["DEBIAN-CVE-2022-21708","GHSA-mh3m-8c74-74xh","GO-2022-0300","UBUNTU-CVE-2022-21708"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Go GraphQL library","requires_auth":"low_privilege","summary":"An attacker can cause a stack overflow panic in the graphql-go library by sending specifically designed queries, leading to a denial of service.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"graphql-go","vendor":"graphql-go_project"}],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-674","name":"Uncontrolled Recursion"},{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Denial of Service in graphql-go","id":"CVE-2022-21708","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":3,"n_references":2,"next":{"headline":"Cross-site Scripting in ShortDescription extension","id":"CVE-2022-21710"},"packages":[{"ecosystem":"Go","fixed":["1.3.0"],"introduced":["0"],"last_affected":[],"package":"github.com/graph-gophers/graphql-go","purl":null,"source":"GHSA-mh3m-8c74-74xh"},{"ecosystem":"Go","fixed":["1.3.0"],"introduced":["0"],"last_affected":[],"package":"github.com/graph-gophers/graphql-go","purl":"pkg:golang/github.com/graph-gophers/graphql-go","source":"GHSA-mh3m-8c74-74xh"},{"ecosystem":"Go","fixed":["1.3.0"],"introduced":["0"],"last_affected":[],"package":"github.com/graph-gophers/graphql-go","purl":"pkg:golang/github.com/graph-gophers/graphql-go","source":"GO-2022-0300"}],"prev":{"headline":"Incorrect Authorization in wasmCloud","id":"CVE-2022-21707"},"products":["graphql-go"],"published":"2022-01-21","related":[{"cvss_score":7.5,"headline":"graphql-go has infinite recursion in the type definition parser","id":"CVE-2022-37315","kev_date_added":null,"published":"2022-08-01"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["graph-gophers"]},"summary":"An attacker can cause a stack overflow panic in the graphql-go library by sending specifically designed queries, leading to a denial of service.","url":"https://insights.sbomify.com/CVE-2022-21708/"}