HIGH 7.7

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)

ArtifactAffected versionsFixed 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

1affected artifacts
250affected versions
114dependent artifacts (est.)
4,818dependent versions

71% of the dependent artifacts (82) still pull an affected version in their latest release.

DepthDependent versions
Direct
1,381
2 hops
1,937
3 hops
1,250
4 hops
171
5 hops
62
6 hops
17

Most used dependents

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

Advisorynvd.nist.gov
Packagegithub.com
Webgithub.com
Webgithub.com
Webbugzilla.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com
Webaccess.redhat.com