4.9Medium

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

Keycloak keycloak; Red Hat Red Hat build of Keycloak 26.0; Red Hat Red Hat build of Keycloak 26.2; Red Hat Red Hat build of Keycloak 26.2.9 Published: (1 year ago)

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.

Weakness (CWE): CWE-526

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
build keycloak 26.0 —
build keycloak 26.2 —
Keycloak keycloak < 26.3.4
Red Hat Red Hat build of Keycloak 26.0 all versions
Red Hat Red Hat build of Keycloak 26.2 all versions
Red Hat Red Hat build of Keycloak 26.2.9 —

References and patches