Sensitive runtime values in Keycloak (up to version 26.0.2) are captured during the build process as default values embedded in bytecode, potentially exposing them during runtime. Affected options include those with the "kc" prefix, SPI runtime options, and Quarkus properties. Environment variables set directly in Keycloak 26 or indirectly in all versions expand unconditionally due to PropertyMapper logic, embedding sensitive data into the bytecode. This unintentional behavior risks sensitive information exposure in production builds.
This issue has been addressed in the following products: Red Hat build of Keycloak 24 Via RHSA-2024:10175 https://access.redhat.com/errata/RHSA-2024:10175
This issue has been addressed in the following products: Red Hat build of Keycloak 24.0.9 Via RHSA-2024:10176 https://access.redhat.com/errata/RHSA-2024:10176
This issue has been addressed in the following products: Red Hat build of Keycloak 26.0 Via RHSA-2024:10177 https://access.redhat.com/errata/RHSA-2024:10177
This issue has been addressed in the following products: Red Hat build of Keycloak 26.0.6 Via RHSA-2024:10178 https://access.redhat.com/errata/RHSA-2024:10178
commit: https://github.com/keycloak/keycloak/pull/35246/files