CVE-2024-8698: Keycloak-saml-core: improper verification of saml responses leading to privilege escalation in keycloak

CVE-2024-8698 affects 94 listed versions of Red Hat Keycloak in the Dawnsentry catalogue.

7.7CVSS high
Proof of concept publicexploitation
2%EPSS (next 30 days)
19 September 2024published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Red Hat Keycloak

94 of 176 listed versions are affected. Fixed in 25.0.6, 24.0.8, 22.0.13. The newest release, 26.37.1, is not affected.

25.0.5 25.0.4 25.0.2 25.0.1 25.0.0 24.0.7 24.0.6 24.0.5 24.0.4 24.0.3 24.0.2 24.0.1 24.0.0 22.0.12 22.0.10 22.0.9 22.0.7 22.0.5 22.0.4 22.0.3 22.0.2 22.0.1 22.0.0 21.1.2 21.1.1 21.1.0 21.0.2 21.0.1 21.0.0 20.0.5 20.0.3 20.0.2 20.0.1 20.0.0 19.0.3 19.0.2 19.0.1 19.0.0 18.0.6 18.0.2 18.0.1 18.0.0 17.0.1 17.0.0 16.1.1 16.1.0 16.0.0 15.1.1 15.1.0 15.0.2 15.0.1 15.0.0 14.0.0 13.0.1 13.0.0 12.0.4 12.0.3 12.0.2 12.0.1 12.0.0 and 34 more

What it is

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.

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L (Red Hat)

Published by Red Hat on 19 September 2024. Last changed 4 August 2026. Exploit code is public (Metasploit or Nuclei).

Sources

Check one version you run: look CVE-2024-8698 up, or pick a product and version in the quick lookup.

Updated 1 December 2026.