{"answers":{"affected":"4 open source packages ship an affected version, including org.keycloak:keycloak-model-storage-services.","exploited":"There is no known exploitation of CVE-2025-9162 in the wild and no public exploit code.","fix":"Upgrade org.keycloak:keycloak-model-storage-services to 26.3.4 or later.","what":"CVE-2025-9162 is a medium-severity code injection vulnerability in Red Hat build of Keycloak 26.0, published on 21 Aug 2025. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-9162 and fix it if it is affected.\n\nWhat it is: CVE-2025-9162 is a medium-severity code injection vulnerability in Red Hat build of Keycloak 26.0, published on 21 Aug 2025. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-9162 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.keycloak:keycloak-model-storage-services (Maven): affected all versions; no fix listed\n- org.keycloak:keycloak-model-storage-services (Maven): affected all versions; no fix listed\n- org.keycloak:keycloak-model-storage-services (Maven): affected from 26.3.0; fixed in 26.3.4\n- org.keycloak:keycloak-model-storage-services (Maven): affected from 26.3.0; fixed in 26.3.4\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-2025-9162/ (Markdown: https://insights.sbomify.com/CVE-2025-9162/index.md)","id":"CVE-2025-9162","markdown":"https://insights.sbomify.com/CVE-2025-9162/index.md","name":"CVE-2025-9162","record":{"aliases":["ECHO-a489-ffe0-f1d7","GHSA-8hxp-qmph-w5gq","MINI-46x7-6pmq-6xr7"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Keycloak identity server","requires_auth":"high_privilege","summary":"Attackers can inject malicious content via crafted realm documents during import, potentially leading to code execution or privilege escalation in Keycloak.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[],"cvss":{"score":4.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-526","name":"Cleartext Storage of Sensitive Information in an Environment Variable"}],"description":"A flaw was found in org.keycloak/keycloak-model-storage-service. The KeycloakRealmImport custom resource substitutes placeholders within imported realm documents, potentially referencing environment variables. This substitution process\nallows for injection attacks when crafted realm documents are processed. An attacker can leverage this to inject malicious content during the realm import procedure. This can lead to unintended consequences within the Keycloak environment.","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":"Org.keycloak/keycloak-model-storage-service: variable injection into environment variables","id":"CVE-2025-9162","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":4,"n_references":8,"next":{"headline":"Houzez \u003c= 4.1.6 - Unauthenticated Stored Cross-Site Scripting via SVG File Upload","id":"CVE-2025-9163"},"packages":[{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":[],"package":"org.keycloak:keycloak-model-storage-services","purl":null,"source":"GHSA-8hxp-qmph-w5gq"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":[],"package":"org.keycloak:keycloak-model-storage-services","purl":"pkg:maven/org.keycloak/keycloak-model-storage-services","source":"GHSA-8hxp-qmph-w5gq"},{"ecosystem":"Maven","fixed":["26.3.4"],"introduced":["26.3.0"],"last_affected":[],"package":"org.keycloak:keycloak-model-storage-services","purl":null,"source":"GHSA-8hxp-qmph-w5gq"},{"ecosystem":"Maven","fixed":["26.3.4"],"introduced":["26.3.0"],"last_affected":[],"package":"org.keycloak:keycloak-model-storage-services","purl":"pkg:maven/org.keycloak/keycloak-model-storage-services","source":"GHSA-8hxp-qmph-w5gq"}],"prev":{"headline":"Rockwell Automation FactoryTalk Optix Remote Code Execution Vulnerability","id":"CVE-2025-9161"},"products":["Red Hat build of Keycloak 26.0","Red Hat build of Keycloak 26.2","Red Hat build of Keycloak 26.2.9","keycloak"],"published":"2025-08-21","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":"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-12-19","vendors":["Keycloak","Red Hat"]},"summary":"Attackers can inject malicious content via crafted realm documents during import, potentially leading to code execution or privilege escalation in Keycloak.","url":"https://insights.sbomify.com/CVE-2025-9162/"}