{"id":"CVE-2025-9162","aliases":["EUVD-2025-25456","GHSA-8hxp-qmph-w5gq","GHSA-w2wj-hw98-233h"],"status":"published","title":"Org.keycloak/keycloak-model-storage-service: variable injection into environment variables","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\nallows 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.","severity":{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00536,"percentile":0.45484,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-526"],"published":"2025-08-21T15:40:25Z","modified":"2026-10-28T02:30:56Z","fixes":[{"ecosystem":"Maven","package":"org.keycloak:keycloak-model-storage-services","fixed_in":["26.2.9","26.3.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.keycloak:keycloak-model-storage-services","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"26.2.9"}]}]},{"source":"ghsa","ecosystem":"Maven","package":"org.keycloak:keycloak-model-storage-services","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"26.3.0"},{"fixed":"26.3.4"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.keycloak:keycloak-model-storage-services","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["24.0.0","24.0.1","24.0.2","24.0.3","24.0.4","24.0.5","25.0.0","25.0.1","25.0.2","25.0.4","25.0.5","25.0.6","26.0.0","26.0.1","26.0.2","26.0.3","26.0.4","26.0.5","26.0.6","26.0.7","26.0.8","26.1.0","26.1.1","26.1.2","26.1.3","26.1.4","26.1.5","26.2.0","26.2.1","26.2.2","26.2.3","26.2.4","26.2.5","26.3.0","26.3.1","26.3.2","26.3.3","26.3.4","26.3.5","26.4.0","26.4.1","26.4.2","26.4.3","26.4.4","26.4.5","26.4.6","26.4.7","26.5.0","26.5.1","26.5.2","26.5.3","26.5.4","26.5.5","26.5.6","26.5.7","26.6.0","26.6.1","26.6.2","26.6.3","26.6.4","26.7.0","26.7.1","26.7.2","26.7.3"]},{"source":"osv","ecosystem":"Maven","package":"org.keycloak:keycloak-model-storage-services","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"26.3.0"},{"fixed":"26.3.4"}]}],"versions":["26.3.0","26.3.1","26.3.2","26.3.3"]}],"products":[{"vendor":"keycloak","product":"keycloak"},{"vendor":"red hat","product":"red hat build of keycloak 26.0"},{"vendor":"red hat","product":"red hat build of keycloak 26.2"},{"vendor":"red hat","product":"red hat build of keycloak 26.2.9"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2025:15336","tags":["vendor-advisory","x_refsource_REDHAT","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2025:15337","tags":["vendor-advisory","x_refsource_REDHAT","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2025:15338","tags":["vendor-advisory","x_refsource_REDHAT","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2025:15339","tags":["vendor-advisory","x_refsource_REDHAT","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2025:16399","tags":["vendor-advisory","x_refsource_REDHAT","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2025:16400","tags":["vendor-advisory","x_refsource_REDHAT","advisory","web"]},{"url":"https://access.redhat.com/security/cve/CVE-2025-9162","tags":["vdb-entry","x_refsource_REDHAT","advisory","web"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2389396","tags":["issue-tracking","x_refsource_REDHAT","report","web"]},{"url":"https://github.com/keycloak/keycloak/security/advisories/GHSA-8hxp-qmph-w5gq","tags":["web"]},{"url":"https://github.com/keycloak/keycloak/blob/26.3.3/model/storage-services/src/main/java/org/keycloak/exportimport/AbstractFileBasedImportProvider.java#L36","tags":["web"]},{"url":"https://github.com/keycloak/keycloak/blob/75afda410495a9576e00edc3277ab42ca155f806/model/storage-services/src/main/java/org/keycloak/exportimport/AbstractFileBasedImportProvider.java#L35","tags":["web"]},{"url":"https://github.com/advisories/GHSA-8hxp-qmph-w5gq"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-9162","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-w2wj-hw98-233h"},{"url":"https://access.redhat.com/downloads/content/package-browser/","tags":["web"]},{"url":"https://catalog.redhat.com/software/containers/","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9162.json","tags":["advisory"]},{"url":"https://github.com/keycloak/keycloak","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-9162","title":"Org.keycloak/keycloak-model-storage-service: variable injection into environment variables","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\nallows 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.","status":"published","published":"2025-08-21T15:40:25.136Z","modified":"2025-12-19T21:46:23.68Z","cvss":[{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-526"],"updated_at":"2026-11-02T14:32:33.755525Z"}],"euvd":[{"id":"EUVD-2025-25456","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\nallows 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.","status":"published","published":"2025-08-21T15:40:25Z","modified":"2025-12-19T21:46:23Z","cvss":[{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T19:49:02.188903Z"}],"ghsa":[{"id":"GHSA-8hxp-qmph-w5gq","title":"Keycloak Potential Variable Reference in Model Storage Services","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.","status":"published","published":"2025-10-08T23:32:36Z","modified":"2025-10-10T14:03:38Z","cvss":[{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-526"],"updated_at":"2026-11-02T14:39:00.807341Z"},{"id":"GHSA-w2wj-hw98-233h","title":"Duplicate Advisory: Keycloak Potential Variable Reference in Model Storage Services","description":"### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-8hxp-qmph-w5gq. This link is maintained to preserve external references.\n\n### Original Description\n\nA 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\nallows 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.","status":"withdrawn","published":"2025-08-21T18:31:27Z","modified":"2025-10-08T23:32:19Z","cvss":[{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-526"],"updated_at":"2026-11-02T14:38:59.83883Z"}],"nvd":[{"id":"CVE-2025-9162","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\nallows 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.","status":"published","published":"2025-08-21T16:15:35.067Z","modified":"2026-06-17T10:08:26.807Z","cvss":[{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-526"],"updated_at":"2026-11-02T14:11:25.261243Z"}],"osv":[{"id":"CVE-2025-9162","title":"Org.keycloak/keycloak-model-storage-service: variable injection into environment variables","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\nallows 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.","status":"published","published":"2025-08-21T15:40:25.136Z","modified":"2026-10-28T02:30:56.028049739Z","cvss":[{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-526"],"updated_at":"2026-11-02T15:44:53.490346Z"},{"id":"GHSA-8hxp-qmph-w5gq","title":"Keycloak Potential Variable Reference in Model Storage Services","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.","status":"published","published":"2025-10-08T23:32:36Z","modified":"2026-09-10T03:50:29.633897015Z","cvss":[{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-526"],"updated_at":"2026-11-02T15:46:42.437513Z"},{"id":"GHSA-w2wj-hw98-233h","title":"Duplicate Advisory: Keycloak Potential Variable Reference in Model Storage Services","description":"### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-8hxp-qmph-w5gq. This link is maintained to preserve external references.\n\n### Original Description\n\nA 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\nallows 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.","status":"withdrawn","published":"2025-08-21T18:31:27Z","modified":"2025-10-08T23:50:35.375602Z","cvss":[{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-526"],"updated_at":"2026-11-02T15:46:58.04805Z"}]}}
