SecurityContext

CVE-2025-9162: Keycloak - Template Injection

  • Cve: CVE-2025-9162
  • Name: Keycloak - Template Injection
  • 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.
  • Impact: Attackers can inject malicious content during realm import, potentially leading to unauthorized actions or configuration changes in Keycloak.
  • Remediation: Update to the latest version with the fix applied.
  • Vulnerability type: template_injection
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 4.9
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
  • Epss score: 0.00611
  • Epss percentile: 0.5024
  • Assignee: [email protected]
  • Published at: 2025-08-21T16:15:35Z
  • Age in days: 460
  • Modified at: 2026-06-17T10:08:26Z
  • Patch available: yes
  • References total: 8
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-9162
  • Nvd status: deferred
  • Checked, none or zero: vulnerability impact, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-526Cleartext Storage of Sensitive Information in an Environment Variable

References

Same in every row:

  • Source: nvd
  • Tags:
Url
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

Products

ProductAffectedPlatform boundSourcesUrl
redhat:keycloak< 26.3.4nocna_alias/v1/products/redhat/keycloak

Projects

RepositoryLink kindsIndexedUrl
keycloak/keycloakpackage, security_advisoryyes/v1/repositories/keycloak/keycloak

Index

  • Repositories: 1
  • Repositories high signal: 1
  • Checked, none or zero: packages

Exploitation

  • Remote: yes
  • Authentication required: yes
  • Exposed hosts: 39460
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports