{"answers":{"affected":"2 open source packages ship an affected version, including org.keycloak:keycloak-parent. It affects 2 products.","exploited":"There is no known exploitation of CVE-2017-12158 in the wild and no public exploit code.","fix":"Upgrade org.keycloak:keycloak-parent to 3.4.0 or later.","what":"CVE-2017-12158 is a medium-severity cross-site scripting vulnerability in Red Hat, Inc. keycloak, published on 26 Oct 2017. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2017-12158 and fix it if it is affected.\n\nWhat it is: CVE-2017-12158 is a medium-severity cross-site scripting vulnerability in Red Hat, Inc. keycloak, published on 26 Oct 2017. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2017-12158 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.keycloak:keycloak-parent (Maven): affected all versions; fixed in 3.4.0\n- org.keycloak:keycloak-parent (Maven): affected all versions; fixed in 3.4.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-2017-12158/ (Markdown: https://insights.sbomify.com/CVE-2017-12158/index.md)","id":"CVE-2017-12158","markdown":"https://insights.sbomify.com/CVE-2017-12158/index.md","name":"CVE-2017-12158","record":{"aliases":["CLEANSTART-2026-IW40503","GHSA-v38p-mqq3-m6v5","MINI-2v2m-r65g-8m3q","MINI-vpp2-gqh7-fg69"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Keycloak identity server","requires_auth":"low_privilege","summary":"An attacker can execute arbitrary scripts in an authenticated user's browser via a malicious HOST header in the Keycloak admin console.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"keycloak","vendor":"keycloak"},{"product":"single_sign_on","vendor":"redhat"}],"cvss":{"score":5.4,"severity":"medium","source":"nvd","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","version":"3.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-444","name":"Inconsistent Interpretation of HTTP Requests"}],"description":"It was found that Keycloak would accept a HOST header URL in the admin console and use it to determine web resource locations. An attacker could use this flaw against an authenticated user to attain reflected XSS via a malicious server.","ecosystems":["Maven"],"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":"Keycloak Reflected XSS","id":"CVE-2017-12158","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"xss","year":"2017"},"n_packages":2,"n_references":5,"next":{"headline":"Keycloak CSRF Vulnerability","id":"CVE-2017-12159"},"packages":[{"ecosystem":"Maven","fixed":["3.4.0"],"introduced":["0"],"last_affected":[],"package":"org.keycloak:keycloak-parent","purl":null,"source":"GHSA-v38p-mqq3-m6v5"},{"ecosystem":"Maven","fixed":["3.4.0"],"introduced":["0"],"last_affected":[],"package":"org.keycloak:keycloak-parent","purl":"pkg:maven/org.keycloak/keycloak-parent","source":"GHSA-v38p-mqq3-m6v5"}],"prev":{"headline":"Moodle sensitive information disclosure","id":"CVE-2017-12157"},"products":["keycloak"],"published":"2017-10-26","related":[{"cvss_score":8.8,"headline":"Moderate severity vulnerability that affects org.keycloak:keycloak-core","id":"CVE-2017-12161","kev_date_added":null,"published":"2018-02-21"},{"cvss_score":8.8,"headline":"JBoss Keycloak CSRF Vulnerability","id":"CVE-2014-3709","kev_date_added":null,"published":"2017-10-18"},{"cvss_score":7.5,"headline":"Keycloak vulnerable to uncontrolled resource consumption","id":"CVE-2014-3651","kev_date_added":null,"published":"2017-12-29"},{"cvss_score":7.5,"headline":"Keycloak CSRF Vulnerability","id":"CVE-2017-12159","kev_date_added":null,"published":"2017-10-26"}],"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-09-16","vendors":["Red Hat, Inc."]},"summary":"An attacker can execute arbitrary scripts in an authenticated user's browser via a malicious HOST header in the Keycloak admin console.","url":"https://insights.sbomify.com/CVE-2017-12158/"}