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

- Priority: **Routine**
- Reason: Not severe (CVSS 4.9, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-08-21 · Modified: 2025-12-19
- Aliases: CGA-55r7-34h8-3fp3, CGA-7fqc-qgwm-8mhj, CGA-f256-49qc-h6gr, CGA-ghw8-8mww-frgj, CGA-hcjg-w42q-r98g, CGA-hqxq-pfvj-hgwg, GHSA-8hxp-qmph-w5gq, CGA-qwgv-v9hp-qchr, CGA-x9fr-xjqp-5vqq
- Record: https://cvemate.com/vulnerability/CVE-2025-9162 · JSON: https://cvemate.com/vulnerability/CVE-2025-9162/json

## Description

```text
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.
```

## Signals

- CVSS: 4.9 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.611%, percentile 50.739%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard keycloak-26.2 (Chainguard): All versions (No fix recorded) \| \< 26.2.5-r6
- chainguard keycloak-26.2-iamguarded-compat (Chainguard): All versions (No fix recorded)
- chainguard keycloak-fips-26.2-iamguarded-fips (Chainguard): All versions (No fix recorded)
- keycloak keycloak: \< 26.3.4
- org.keycloak keycloak-model-storage-services (Maven): All versions (No fix recorded) \| ≥ 26.3.0, \< 26.3.4

## References

- <https://access.redhat.com/errata/RHSA-2025:15336>
- <https://access.redhat.com/errata/RHSA-2025:15337>
- <https://access.redhat.com/errata/RHSA-2025:15338>
- <https://access.redhat.com/errata/RHSA-2025:15339>
- <https://access.redhat.com/errata/RHSA-2025:16399>
- <https://access.redhat.com/errata/RHSA-2025:16400>
- <https://access.redhat.com/security/cve/CVE-2025-9162>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2389396>
- <https://access.redhat.com/downloads/content/package-browser/>
- <https://catalog.redhat.com/software/containers/>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9162.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-9162>
- <https://github.com/keycloak/keycloak>
- <https://github.com/keycloak/keycloak/security/advisories/GHSA-8hxp-qmph-w5gq>
- <https://github.com/keycloak/keycloak/blob/26.3.3/model/storage-services/src/main/java/org/keycloak/exportimport/AbstractFileBasedImportProvider.java#L36>
- <https://github.com/keycloak/keycloak/blob/75afda410495a9576e00edc3277ab42ca155f806/model/storage-services/src/main/java/org/keycloak/exportimport/AbstractFileBasedImportProvider.java#L35>

---

Data as of 2026-12-05T08:28:22.624Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
