Keycloak Model Storage Service Variable Injection Vulnerability
Vulnerability
A vulnerability exists in the Keycloak Model Storage Service, specifically within the KeycloakRealmImport custom resource. This issue arises because the import process replaces placeholders in realm documents, which can potentially reference environment variables. Such substitution creates an opportunity for injection attacks, allowing malicious content to be introduced during the realm import. As a result, sensitive environment variables, like the database password, could be compromised, leading to unintended consequences in the Keycloak environment.
Impact
Exploitation of this vulnerability could result in the injection of malicious content into the Keycloak environment, potentially allowing access to sensitive information stored in environment variables, such as database passwords.
Reproduction
To reproduce this vulnerability, import a crafted realm document that includes placeholders referencing sensitive environment variables. During the import process, the KeycloakRealmImport custom resource will replace the placeholders with the actual variable values, injecting the referenced content into the Keycloak environment.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
