CVE-2024-8698
Improper Verification of SAML Responses Leading to Privilege Escalation in Keycloak
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 Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.keycloak » keycloak-saml-core | < 22.0.13>= 23.0.0, < 24.0.8>= 25.0.0, < 25.0.6 | 22.0.13, 24.0.8, 25.0.6 |
Blast radius
71% of the dependent artifacts (82) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 1,381 |
| 2 hops | 1,937 |
| 3 hops | 1,250 |
| 4 hops | 171 |
| 5 hops | 62 |
| 6 hops | 17 |
Most used dependents
- org.keycloak » keycloak-dependencies-server-all22 usages
- org.keycloak » keycloak-quarkus-server11 usages
- org.hawkular.accounts » hawkular-accounts-feature-pack11 usages
- org.keycloak » keycloak-wildfly-adapter-dist10 usages
- org.keycloak » keycloak-server-feature-pack8 usages
- org.keycloak » keycloak-server-overlay8 usages
- org.keycloak » keycloak-testsuite-integration8 usages
- org.keycloak » keycloak-saml-servlet-filter-adapter7 usages
- org.keycloak » keycloak-saml-tomcat-adapter-core6 usages
- org.keycloak.testsuite » integration-arquillian-testsuite-providers6 usages
- org.keycloak » keycloak-saml-jetty-adapter-core5 usages
- org.keycloak » keycloak-quarkus-dist5 usages
- org.keycloak » keycloak-junit55 usages
- org.hawkular.agent » hawkular-wildfly-agent-itest-feature-pack5 usages
- org.hawkular.accounts » hawkular-accounts-distribution5 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2024-8698 | nvd.nist.gov |
| Package | keycloak/keycloak | github.com |
| Web | keycloak/keycloak advisory GHSA-xgfv-xpx8-qhcr | github.com |
| Web | keycloak/keycloak release 25.0.6 | github.com |
| Web | show_bug.cgi | bugzilla.redhat.com |
| Web | security/cve/CVE-2024-8698 | access.redhat.com |
| Web | errata/RHSA-2024:8826 | access.redhat.com |
| Web | errata/RHSA-2024:8824 | access.redhat.com |
| Web | errata/RHSA-2024:8823 | access.redhat.com |
| Web | errata/RHSA-2024:6890 | access.redhat.com |
| Web | errata/RHSA-2024:6889 | access.redhat.com |
| Web | errata/RHSA-2024:6888 | access.redhat.com |
| Web | errata/RHSA-2024:6887 | access.redhat.com |
| Web | errata/RHSA-2024:6886 | access.redhat.com |
| Web | errata/RHSA-2024:6882 | access.redhat.com |
| Web | errata/RHSA-2024:6880 | access.redhat.com |
| Web | errata/RHSA-2024:6879 | access.redhat.com |
| Web | errata/RHSA-2024:6878 | access.redhat.com |
