Every CVE Search/ Get API key

CVE-2025-9162

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

4.9 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
High
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
None

Exploit likelihood

0.54%Up 0.5 points since Aug 22, 2025
90%50%10%1%

What each source reports

CVE List Score used 4.9

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

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.

Record
CVE-2025-9162
CVSS 3.1
4.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-526
Updated
2026-11-02
EUVDEUVD-2025-25456 4.9

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.

Record
EUVD-2025-25456
CVSS 3.1
4.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-8hxp-qmph-w5gq 4.9

Keycloak Potential Variable Reference in Model Storage Services

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.

Record
GHSA-8hxp-qmph-w5gq
CVSS 3.1
4.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-526
Updated
2026-11-02
GitHub AdvisoriesGHSA-w2wj-hw98-233h 4.9

Duplicate Advisory: Keycloak Potential Variable Reference in Model Storage Services

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-8hxp-qmph-w5gq. This link is maintained to preserve external references.

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

Record
GHSA-w2wj-hw98-233h
CVSS 3.1
4.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-526
Updated
2026-11-02
NVD 4.9

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.

Record
CVE-2025-9162
CVSS 3.1
4.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-526
Updated
2026-11-02
OSV 4.9

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

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.

Record
CVE-2025-9162
CVSS 3.1
4.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-526
Updated
2026-11-02
OSVGHSA-8hxp-qmph-w5gq 4.9

Keycloak Potential Variable Reference in Model Storage Services

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.

Record
GHSA-8hxp-qmph-w5gq
CVSS 3.1
4.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-526
Updated
2026-11-02
OSVGHSA-w2wj-hw98-233h 4.9

Duplicate Advisory: Keycloak Potential Variable Reference in Model Storage Services

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-8hxp-qmph-w5gq. This link is maintained to preserve external references.

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

Record
GHSA-w2wj-hw98-233h
CVSS 3.1
4.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-526
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.keycloak:keycloak-model-storage-services
Maven
before 26.2.9
26.2.9
org.keycloak:keycloak-model-storage-services
Maven
26.3.0 up to 26.3.4
26.3.4
org.keycloak:keycloak-model-storage-services
Maven
All versions, plus listed versions
24.0.024.0.124.0.224.0.324.0.4
Show 45 moreShow less
24.0.525.0.025.0.125.0.225.0.425.0.525.0.626.0.026.0.126.0.226.0.326.0.426.0.526.0.626.0.726.0.826.1.026.1.126.1.226.1.326.1.426.1.526.2.026.2.126.2.226.2.326.2.426.2.526.3.026.3.126.3.226.3.326.3.426.3.526.4.026.4.126.4.226.4.326.4.426.4.526.4.626.4.726.5.026.5.126.5.2
None known
org.keycloak:keycloak-model-storage-services
Maven
26.3.0 up to 26.3.4, plus listed versions
26.3.126.3.226.3.3
26.3.4

History

History
RecordedChangedSources
affected
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-9162 is a medium vulnerability (CVSS 4.9) in Keycloak, published August 21, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.54%, the 45th percentile. Fixed in org.keycloak:keycloak-model-storage-services 26.2.9.

References

Show 12 moreShow less
This page doesn't list everything

Left out here: 14 versions. The JSON record has them.

MoveEnter Open