What’s Vulnerable › Vulnerabilities
CVE-2025-9162: Org.keycloak/keycloak-model-storage-service: variable injection into environment variables
- Severity: medium (CVSS 4.9 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-08-21 · updated 2026-06-17
- Weakness: CWE-526
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 allows 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.
Affected products
- Red Hat build of Keycloak 26.4: all versions — fixed in 26.0-18, 26.0-19, 26.0.15-1, 26.2-8, 26.2-9, 26.2.8-1
- Keycloak: before 26.3.4 — fixed in 26.3.4
How to fix
Upgrade to a fixed version: Red Hat build of Keycloak 26.4 26.0-18, 26.0-19, 26.0.15-1, 26.2-8; Keycloak 26.3.4. Check the vendor advisory for mitigations.
References
- https://access.redhat.com/errata/RHSA-2025:15336
- https://access.redhat.com/errata/RHSA-2025:15337
- https://access.redhat.com/errata/RHSA-2025:15338
- https://access.redhat.com/errata/RHSA-2025:15339
- https://access.redhat.com/errata/RHSA-2025:16399
- https://access.redhat.com/errata/RHSA-2025:16400
- https://access.redhat.com/security/cve/CVE-2025-9162
- https://bugzilla.redhat.com/show_bug.cgi?id=2389396
Get alerted when CVE-2025-9162 or the next vulnerability affects your stack