Medium severity · published Aug 21, 2025
CVE-2025-9162
Org.keycloak/keycloak-model-storage-service: variable injection into environment variables
4.9
CVSS
0.5%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Attack vector
Network
Complexity
Low
Privileges
High
User interaction
None
Confidentiality
High
Integrity
None
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 44% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
RH
Red Hat build of Keycloak 26.0 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat build of Keycloak 26.2 · Red Hat
All versions, or not specified · source: vendor
KE
keycloak · Keycloak
before 26.3.4 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-9162
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-9162
access.redhat.com
https://access.redhat.com/errata/RHSA-2025:15336
access.redhat.com
https://access.redhat.com/errata/RHSA-2025:15337
access.redhat.com
https://access.redhat.com/errata/RHSA-2025:15338
access.redhat.com
https://access.redhat.com/errata/RHSA-2025:15339
access.redhat.com
https://access.redhat.com/errata/RHSA-2025:16399
access.redhat.com
https://access.redhat.com/errata/RHSA-2025:16400
More from keycloak
8.8
CVE-2017-12161
It was found that keycloak before 3.4.2 final would permit misuse of a client-side /etc/hosts entry to spoof a URL in a password reset request
8.8
CVE-2014-3709
The org.keycloak.services.resources.SocialResource.callback method in JBoss KeyCloak before 1.0.3.Final allows remote attackers to conduct cross-site request forgery (CSRF)…
8.1
CVE-2026-1609
Org.keycloak/keycloak-quarkus-server: keycloak: unauthorized access via jwt authorization grant with disabled users
7.5
CVE-2014-3651
JBoss KeyCloak before 1.0.3.Final allows remote attackers to cause a denial of service (resource consumption) via a large value in the size parameter to auth/qrcode, related to QR…
7.5
CVE-2017-12159
It was found that the cookie used for CSRF prevention in Keycloak was not unique to each session
