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

- Severity: Medium 4.9 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.61%, higher than 50% of CVEs (2026-12-01)
- Published: 2025-08-21T15:40:25.136Z
- Modified: 2026-09-10T03:50:29.633Z
- Also known as: GHSA-8hxp-qmph-w5gq
- Weaknesses: CWE-526
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: redhat

## 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.

(As written by CVE List.)

## Affected

- keycloak: before 26.3.4
- org.keycloak/keycloak-model-storage-service: no versions given
- rhbk/keycloak-operator-bundle: no versions given (not affected: from 26.0.15-1 before *; from 26.2.8-1 before *; from 26.2.9-1 before *)
- rhbk/keycloak-rhel9: no versions given (not affected: from 26.0-18 before *; from 26.2-8 before *; from 26.2-9 before *)
- rhbk/keycloak-rhel9-operator: no versions given (not affected: from 26.0-19 before *; from 26.2-8 before *; from 26.2-9 before *)
- org.keycloak:keycloak-model-storage-services (Maven): all versions; from 26.3.0 before 26.3.4

## Every score

- redhat: CVSS:3.1 4.9 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 4.9 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://access.redhat.com/errata/RHSA-2025:15336> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2025:15337> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2025:15338> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2025:15339> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2025:16399> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2025:16400> (vendor-advisory, web)
- <https://access.redhat.com/security/cve/CVE-2025-9162> (vdb-entry, web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2389396> (issue-tracking, web)
- <https://github.com/keycloak/keycloak/security/advisories/GHSA-8hxp-qmph-w5gq> (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)

## Sources

- CVE List: [CVE-2025-9162](https://www.cve.org/CVERecord?id=CVE-2025-9162), CVE Terms of Use, modified 2025-12-19
- GitHub Advisory Database: [GHSA-8hxp-qmph-w5gq](https://github.com/advisories/GHSA-8hxp-qmph-w5gq), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-9162](https://nvd.nist.gov/vuln/detail/CVE-2025-9162), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-9162 · Whole record: https://cve.day/CVE-2025-9162.json · Rebuilt by cve.day 2026-11-25T22:59:03.479Z
