CVE-2025-9162

Org.keycloak/keycloak-model-storage-service: variable injection into environment variables

Published Aug 21, 2025 CVSS 3.1 · 4.9 Medium EPSS < 1% KEV · Not listed
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.

Remediation

Vendor Workaround

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-25456 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.
Github GHSA Github GHSA GHSA-w2wj-hw98-233h Keycloak Potential Variable Reference in Model Storage Services
Github GHSA Github GHSA GHSA-8hxp-qmph-w5gq Keycloak Potential Variable Reference in Model Storage Services
History
Type Values Removed Values Added
CPEs cpe:/a:redhat:build_keycloak: cpe:/a:redhat:build_keycloak:26.0
cpe:/a:redhat:build_keycloak:26.0::el9
cpe:/a:redhat:build_keycloak:26.2
cpe:/a:redhat:build_keycloak:26.2::el9
References
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description No description is available for this CVE. 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.
Title org.keycloak/keycloak-model-storage-service: Variable injection into environment variables Org.keycloak/keycloak-model-storage-service: variable injection into environment variables
First Time appeared Redhat
Redhat build Keycloak
CPEs cpe:/a:redhat:build_keycloak:
Vendors & Products Redhat
Redhat build Keycloak
References
Type Values Removed Values Added
Description No description is available for this CVE.
Title org.keycloak/keycloak-model-storage-service: Variable injection into environment variables
Weaknesses CWE-526
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.9, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N'}

threat_severity

Moderate

Weaknesses

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Dec 19, 2025, 9:46 PM
Reserved
Aug 19, 2025, 1:11 PM
Status
Deferred
Published
Aug 21, 2025, 4:15 PM
Modified
Jun 17, 2026, 10:08 AM
Severity
Moderate
Public date
Aug 19, 2025, 12:00 AM