CVE-2025-9162: Red Hat build of Keycloak 26.0 · Cleartext Storage of Sensitive Information in an Environment Variable
Affects Red Hat build of Keycloak 26.0Source CVE Database V5
Not known to be exploited · CVSS 4.9 Medium.
Data as of 26 Oct 2026, 17:16 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 43% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 21 Aug 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
AI-suggested
To mitigate CVE-2025-9162, European organizations should implement the following specific measures: 1) Apply official patches or updates from Red Hat as soon as they become available to address the vulnerability directly. 2) Restrict the ability to perform realm imports to a minimal set of trusted administrators to reduce the risk of malicious document injection. 3) Audit and monitor all realm import activities for unusual or unauthorized operations. 4) Review and minimize the use of sensitive environment variables during realm import processes, avoiding storing critical secrets in environment variables accessible to Keycloak imports. 5) Implement input validation and sanitization controls on realm documents before import, potentially using custom validation scripts or tools. 6) Employ network segmentation and access controls to limit exposure of Keycloak administrative interfaces. 7) Conduct regular security training for administrators on safe import practices and the risks of environment variable exposure. These targeted actions go beyond generic advice by focusing on the specific attack vector and operational context of the vulnerability.
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.
References
- access.redhat.com/errata/RHSA-2025:15336 (opens in a new tab)
- access.redhat.com/errata/RHSA-2025:15337 (opens in a new tab)
- access.redhat.com/errata/RHSA-2025:15338 (opens in a new tab)
- access.redhat.com/errata/RHSA-2025:15339 (opens in a new tab)
- access.redhat.com/errata/RHSA-2025:16399 (opens in a new tab)
- access.redhat.com/errata/RHSA-2025:16400 (opens in a new tab)
- access.redhat.com/security/cve/CVE-2025-9162 (opens in a new tab)
- bugzilla.redhat.com/show_bug.cgi?id=2389396 (opens in a new tab)