GitHub Advisoryadvisory · Maven
GHSA-8hxp-qmph-w5gq Keycloak Potential Variable Reference in Model Storage Services
MEDIUM
Official page ↗
- Aliases
- CVE-2025-9162
- Ecosystem
- Maven
- Packages
- org.keycloak:keycloak-model-storage-services
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
- Weaknesses
- CWE-526
- Reviewed
- 2025-10-08
Affected packages
• Maven org.keycloak:keycloak-model-storage-services: < 26.2.9 (no fix yet)
• Maven org.keycloak:keycloak-model-storage-services: >= 26.3.0, < 26.3.4 → fixed in 26.3.4
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.
Related
Alias · CVE (1)
- CVE-2025-9162 A flaw was found in org.keycloak/keycloak-model-storage-service. vulnerability
Weakness · CWE (1)
- CWE-526 Cleartext Storage of Sensitive Information in an Environment Variable weakness
References
- https://github.com/keycloak/keycloak/security/advisories/GHSA-8hxp-qmph-w5gq web
- https://access.redhat.com/errata/RHSA-2025:15336 web
- https://access.redhat.com/errata/RHSA-2025:15337 web
- https://access.redhat.com/errata/RHSA-2025:15338 web
- https://access.redhat.com/errata/RHSA-2025:15339 web
- https://access.redhat.com/errata/RHSA-2025:16399 web
- https://access.redhat.com/errata/RHSA-2025:16400 web
- https://access.redhat.com/security/cve/CVE-2025-9162 web
- https://bugzilla.redhat.com/show_bug.cgi?id=2389396 web
- https://github.com/keycloak/keycloak package
- https://github.com/keycloak/keycloak/blob/26.3.3/model/storage-services/src/main/java/org/keycloak/exportimport/AbstractFileBasedImportProvider.java#L36 web
- https://github.com/keycloak/keycloak/blob/75afda410495a9576e00edc3277ab42ca155f806/model/storage-services/src/main/java/org/keycloak/exportimport/AbstractFileBasedImportProvider.java#L35 web