{"answers":{"affected":"2 open source packages ship an affected version, including graphql-playground-html. It affects 5 products.","exploited":"There is no known exploitation of CVE-2020-4038 in the wild and no public exploit code.","fix":"Upgrade graphql-playground-html to 1.6.22 or later.","what":"CVE-2020-4038 is a high-severity cross-site scripting vulnerability in prisma-labs graphql-playground, published on 8 Jun 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2020-4038 and fix it if it is affected.\n\nWhat it is: CVE-2020-4038 is a high-severity cross-site scripting vulnerability in prisma-labs graphql-playground, published on 8 Jun 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2020-4038 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- graphql-playground-html (npm): affected all versions; fixed in 1.6.22\n- graphql-playground-html (npm): affected all versions; fixed in 1.6.22\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-2020-4038/ (Markdown: https://insights.sbomify.com/CVE-2020-4038/index.md)","id":"CVE-2020-4038","markdown":"https://insights.sbomify.com/CVE-2020-4038/index.md","name":"CVE-2020-4038","record":{"aliases":["GHSA-4852-vrh7-28rf"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"GraphQL Playground library","requires_auth":"none","summary":"Reflected XSS in GraphQL Playground allows attackers to execute arbitrary scripts via unsanitized input in the renderPlaygroundPage method.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"graphql-playground-html","vendor":"prisma"},{"product":"graphql-playground-middleware-express","vendor":"prisma"},{"product":"graphql-playground-middleware-hapi","vendor":"prisma"},{"product":"graphql-playground-middleware-koa","vendor":"prisma"},{"product":"graphql-playground-middleware-lambda","vendor":"prisma"}],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"GraphQL Playground (graphql-playground-html NPM package) before version 1.6.22 have a severe XSS Reflection attack vulnerability. All unsanitized user input passed into renderPlaygroundPage() method could trigger this vulnerability. This has been patched in graphql-playground-html version 1.6.22. Note that some of the associated dependent middleware packages are also affected including but not limited to graphql-playground-middleware-express before version 1.7.16, graphql-playground-middleware-koa before version 1.6.15, graphql-playground-middleware-lambda before version 1.7.17, and graphql-playground-middleware-hapi before 1.6.13.","ecosystems":["npm"],"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":"Reflected XSS in GraphQL Playground","id":"CVE-2020-4038","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2020"},"n_packages":2,"n_references":3,"next":{"headline":"Directory Traversal Vulnerability in SUSI.AI Server","id":"CVE-2020-4039"},"packages":[{"ecosystem":"npm","fixed":["1.6.22"],"introduced":["0"],"last_affected":[],"package":"graphql-playground-html","purl":null,"source":"GHSA-4852-vrh7-28rf"},{"ecosystem":"npm","fixed":["1.6.22"],"introduced":["0"],"last_affected":[],"package":"graphql-playground-html","purl":"pkg:npm/graphql-playground-html","source":"GHSA-4852-vrh7-28rf"}],"prev":{"headline":"Open Redirect in OAuth2 Proxy","id":"CVE-2020-4037"},"products":["graphql-playground"],"published":"2020-06-08","related":[],"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":"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["prisma-labs"]},"summary":"Reflected XSS in GraphQL Playground allows attackers to execute arbitrary scripts via unsanitized input in the renderPlaygroundPage method.","url":"https://insights.sbomify.com/CVE-2020-4038/"}