{"answers":{"affected":"4 open source packages ship an affected version, including @keystone-6/auth and @keystone-next/auth. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-0087 exists.","fix":"Upgrade @keystone-6/auth to 1.0.2 or later.","what":"CVE-2022-0087 is a high-severity cross-site scripting vulnerability in keystonejs/keystone, published on 11 Jan 2022. 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-2022-0087 and fix it if it is affected.\n\nWhat it is: CVE-2022-0087 is a high-severity cross-site scripting vulnerability in keystonejs/keystone, published on 11 Jan 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-0087 exists.\n\nAffected packages and fixed versions:\n- @keystone-6/auth (npm): affected all versions; fixed in 1.0.2\n- @keystone-6/auth (npm): affected all versions; fixed in 1.0.2\n- @keystone-next/auth (npm): affected all versions up to 37.0.0; no fix listed\n- @keystone-next/auth (npm): affected all versions up to 37.0.0; no fix listed\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-0087/ (Markdown: https://insights.sbomify.com/CVE-2022-0087/index.md)","id":"CVE-2022-0087","markdown":"https://insights.sbomify.com/CVE-2022-0087/index.md","name":"CVE-2022-0087","record":{"aliases":["GHSA-hrgx-7j6v-xj82"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"KeystoneJS CMS","requires_auth":"none","summary":"Reflected Cross-Site Scripting in KeystoneJS allows attackers to inject malicious scripts into web pages viewed by other users.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntrdev","cpe":[{"product":"keystone","vendor":"keystonejs"}],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","version":"3.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"keystone is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2022/CVE-2022-0087.yaml","stars":null,"title":"Keystone 6 Login Page - Open Redirect and Cross-Site Scripting"}],"tier":"weaponised"},"has_fix":true,"headline":"Cross-site Scripting (XSS) - Reflected in keystonejs/keystone","id":"CVE-2022-0087","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":4,"n_references":2,"next":{"headline":"Cross-Site Request Forgery (CSRF) in yourls/yourls","id":"CVE-2022-0088"},"packages":[{"ecosystem":"npm","fixed":["1.0.2"],"introduced":["0"],"last_affected":[],"package":"@keystone-6/auth","purl":null,"source":"GHSA-hrgx-7j6v-xj82"},{"ecosystem":"npm","fixed":["1.0.2"],"introduced":["0"],"last_affected":[],"package":"@keystone-6/auth","purl":"pkg:npm/%40keystone-6/auth","source":"GHSA-hrgx-7j6v-xj82"},{"ecosystem":"npm","fixed":[],"introduced":["0"],"last_affected":["37.0.0"],"package":"@keystone-next/auth","purl":null,"source":"GHSA-hrgx-7j6v-xj82"},{"ecosystem":"npm","fixed":[],"introduced":["0"],"last_affected":["37.0.0"],"package":"@keystone-next/auth","purl":"pkg:npm/%40keystone-next/auth","source":"GHSA-hrgx-7j6v-xj82"}],"prev":{"headline":"Server-Side Request Forgery (SSRF) in transloadit/uppy","id":"CVE-2022-0086"},"products":["keystonejs/keystone"],"published":"2022-01-11","related":[{"cvss_score":9.8,"headline":"NODE_ENV in Keystone defaults to development with esbuild","id":"CVE-2022-39382","kev_date_added":null,"published":"2022-11-03"},{"cvss_score":9.8,"headline":"File upload in n/a","id":"CVE-2022-29354","kev_date_added":null,"published":"2022-05-16"},{"cvss_score":9.1,"headline":"@keystone-6/core vulnerable to field-level access-control bypass for multiselect field","id":"CVE-2022-39322","kev_date_added":null,"published":"2022-10-25"},{"cvss_score":8.8,"headline":"Cross-Site Request Forgery (CSRF) in keystone","id":"CVE-2017-16570","kev_date_added":null,"published":"2017-11-06"},{"cvss_score":8.8,"headline":"Keystone is vulnerable to CSV injection","id":"CVE-2017-15879","kev_date_added":null,"published":"2017-10-24"},{"cvss_score":7.5,"headline":"Authentication Weakness in keystone","id":"CVE-2015-9240","kev_date_added":null,"published":"2018-05-29"}],"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)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-02","vendors":["keystonejs"]},"summary":"Reflected Cross-Site Scripting in KeystoneJS allows attackers to inject malicious scripts into web pages viewed by other users.","url":"https://insights.sbomify.com/CVE-2022-0087/"}