Vulnerability · Published Sep 19, 2024 · Assigned by redhat
CVE-2024-8698Keycloak-saml-core: improper verification of saml responses leading to privilege escalation in keycloak
High 7.7
In plain English
A high-severity security flaw in keycloak. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.0% (higher than 81% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
A flaw exists in the SAML signature validation method within the Keycloak XMLSignatureUtil class. The method incorrectly determines whether a SAML signature is for the full document or only for specific assertions based on the position of the signature in the XML document, rather than the Reference element used to specify the signed element. This flaw allows attackers to create crafted responses that can bypass the validation, potentially leading to privilege escalation or impersonation attacks.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.keycloak:keycloak-saml-core | 22.0.13 | GHSA-xgfv-xpx8-qhcr |
| Maven | org.keycloak:keycloak-saml-core | 24.0.8 | GHSA-xgfv-xpx8-qhcr |
| Maven | org.keycloak:keycloak-saml-core | 25.0.6 | GHSA-xgfv-xpx8-qhcr |
Affected products (as reported)
Weakness: CWE-347 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L
References
- RHSA-2024:6878 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6879 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6880 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6882 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6886 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6887 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6888 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6889 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6890 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8823 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8824 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8826 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-8698 vdb-entry, x_refsource_REDHAT
- RHBZ#2311641 issue-tracking, x_refsource_REDHAT