Org.keycloak/keycloak-model-storage-service: variable injection into environment variables
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Keycloak | keycloak | before 26.3.4 | 26.3.4 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.0 | — | — | Not affected | CNA |
| Red Hat | Red Hat build of Keycloak 26.0 | — | 26.0.15-1 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.0 | — | 26.0-18 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.0 | — | 26.0-19 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.2 | — | — | Not affected | CNA |
| Red Hat | Red Hat build of Keycloak 26.2 | — | 26.2.8-1 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.2 | — | 26.2-8 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.2 | — | 26.2-8 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.2 | — | 26.2.9-1 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.2 | — | 26.2-9 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.2 | — | 26.2-9 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 26.2.9 | — | — | Not affected | CNA |
| — | org.keycloak:keycloak-model-storage-services (Maven) | all versions | — | No fix listed | GHSA-8hxp-qmph-w5gq |
| — | org.keycloak:keycloak-model-storage-services (Maven) | 26.3.0 to before 26.3.4 | 26.3.4 | Patch available | GHSA-8hxp-qmph-w5gq |
- keycloak VendorKeycloak Affected before 26.3.4 Fixed in 26.3.4 Patch available CNA
- Red Hat build of Keycloak 26.0 VendorRed Hat Affected — Fixed in — Not affected CNA
- Red Hat build of Keycloak 26.0 VendorRed Hat Affected — Fixed in 26.0.15-1 Patch available CNA
- Red Hat build of Keycloak 26.0 VendorRed Hat Affected — Fixed in 26.0-18 Patch available CNA
- Red Hat build of Keycloak 26.0 VendorRed Hat Affected — Fixed in 26.0-19 Patch available CNA
- Red Hat build of Keycloak 26.2 VendorRed Hat Affected — Fixed in — Not affected CNA
- Red Hat build of Keycloak 26.2 VendorRed Hat Affected — Fixed in 26.2.8-1 Patch available CNA
- Red Hat build of Keycloak 26.2 VendorRed Hat Affected — Fixed in 26.2-8 Patch available CNA
- Red Hat build of Keycloak 26.2 VendorRed Hat Affected — Fixed in 26.2-8 Patch available CNA
- Red Hat build of Keycloak 26.2 VendorRed Hat Affected — Fixed in 26.2.9-1 Patch available CNA
- Red Hat build of Keycloak 26.2 VendorRed Hat Affected — Fixed in 26.2-9 Patch available CNA
- Red Hat build of Keycloak 26.2 VendorRed Hat Affected — Fixed in 26.2-9 Patch available CNA
- Red Hat build of Keycloak 26.2.9 VendorRed Hat Affected — Fixed in — Not affected CNA
- org.keycloak:keycloak-model-storage-services (Maven) Vendor— Affected all versions Fixed in — No fix listed GHSA-8hxp-qmph-w5gq
- org.keycloak:keycloak-model-storage-services (Maven) Vendor— Affected 26.3.0 to before 26.3.4 Fixed in 26.3.4 Patch available GHSA-8hxp-qmph-w5gq
Remediation
- Fix · CNA keycloak (Keycloak) Fixed in 26.3.4
- Fix · GHSA-8hxp-qmph-w5gq org.keycloak:keycloak-model-storage-services (Maven) Fixed in 26.3.4 Advisory →
Red Hat 6 advisories
- RHSA-2025:16399 Released 2025-09-22 · Red Hat rating ModerateRed Hat build of Keycloak 26.2.9 Security Update
- Red Hat build of Keycloak 26.2.9
- RHSA-2025:16400 Released 2025-09-22 · Red Hat rating ModerateRed Hat build of Keycloak 26.2.9 Images Security Update
- Red Hat build of Keycloak 26.2 rhbk/keycloak-operator-bundle, rhbk/keycloak-rhel9, rhbk/keycloak-rhel9-operator
- RHSA-2025:15337 Released 2025-09-04 · Red Hat rating ModerateRed Hat build of Keycloak 26.0.15 Images Update
- Red Hat build of Keycloak 26.0 rhbk/keycloak-operator-bundle, rhbk/keycloak-rhel9, rhbk/keycloak-rhel9-operator
Show 3 more Red Hat advisories
- RHSA-2025:15338 Released 2025-09-04 · Red Hat rating ModerateRed Hat build of Keycloak 26.2.8 Images Security Update
- Red Hat build of Keycloak 26.2 rhbk/keycloak-operator-bundle, rhbk/keycloak-rhel9, rhbk/keycloak-rhel9-operator
- RHSA-2025:15339 Released 2025-09-04 · Red Hat rating ModerateRed Hat build of Keycloak 26.2.8 Security Update
- Red Hat build of Keycloak 26.2
- RHSA-2025:15336 Released 2025-09-04 · Red Hat rating ModerateRed Hat build of Keycloak 26.0.15 Update
- Red Hat build of Keycloak 26.0
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat build of Keycloak 26.0 | Fixed | RHSA-2025:15336, RHSA-2025:15337 |
| Red Hat build of Keycloak 26.2 | Fixed | RHSA-2025:15338, RHSA-2025:15339, RHSA-2025:16400 |
| Red Hat build of Keycloak 26.2.9 | Fixed | RHSA-2025:16399 |
Timeline
- 2026-10-02 Threatist record created from CVE-2025-9162
- 2026-10-03 Alias added: GHSA-8hxp-qmph-w5gq
References
Advisory 6
Other 6
- https://access.redhat.com/security/cve/CVE-2025-9162
- RHBZ#2389396
- https://github.com/keycloak/keycloak/security/advisories/GHSA-8hxp-qmph-w5gq
- https://github.com/keycloak/keycloak
- 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
More Keycloak vulnerabilities
- TI-2022-03994 Cross-site scripting in keycloak CVSS 3.1CRITICAL 10.0
- TI-2017-05120 It was found that the Keycloak Node.js adapter 2.5 - 3.0 did not handle invalid tokens… CVSS 3.0CRITICAL 9.8
- TI-2017-08952 Weak password recovery in Red Hat Keycloak CVSS 3.0HIGH 8.8
- TI-2014-03024 The org.keycloak.services.resources.SocialResource.callback method in JBoss KeyCloak… CVSS 3.0HIGH 8.8
- TI-2026-01295 Org.keycloak/keycloak-quarkus-server: keycloak: unauthorized access via jwt authorization grant with disabled users CVSS 3.1HIGH 8.1
- TI-2017-08950 Insufficient session expiration in Red Hat keycloak CVSS 3.0HIGH 7.5
Sources
- CVE-2025-9162 · CVE Program
- CVE-2025-9162 · NVD
- FIRST EPSS
- GHSA-8hxp-qmph-w5gq · GitHub Advisory Database · CC BY 4.0
- CVE-2025-9162 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences