CVE-2024-8698 — keycloak-saml-core
HIGHCVE-2024-8698 is a high-severity (CVSS 7.7) CWE-347 vulnerability in org.keycloak:keycloak-saml-core. 2 public exploit references exist, so weaponization risk is real. A fix is available for org.keycloak:keycloak-saml-core — see the affected versions and patch details below.
Keycloak-saml-core: improper verification of saml responses leading to privilege escalation in keycloak
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-8698.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2024-8698 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,166 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
org.keycloak:keycloak-saml-core☕org.keycloak:keycloak-saml-core☕org.keycloak:keycloak-saml-coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.keycloak:keycloak-saml-core | all versions | 22.0.13org.keycloak:keycloak-saml-core:22.0.13 |
| ☕Maven | org.keycloak:keycloak-saml-core | ≥ 23.0.0&&< 24.0.8 | 24.0.8org.keycloak:keycloak-saml-core:24.0.8 |
| ☕Maven | org.keycloak:keycloak-saml-core | ≥ 25.0.0&&< 25.0.6 | 25.0.6org.keycloak:keycloak-saml-core:25.0.6 |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.keycloak:keycloak-saml-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.keycloak:keycloak-saml-core to 22.0.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-8698 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2024-8698 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2024-8698. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
How to detect CVE-2024-8698
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2024-8698 -u https://target- Template
- Keycloak - SAML Core Package Signature Validation Flaw
- Severity
- high
- Impact
- Attackers can create crafted SAML responses that bypass signature validation, potentially leading to privilege escalation, impersonation attacks, and unauthorized access to protected resources in Keycloak.
- Remediation
- Apply Red Hat security updates (RHSA-2024:6878, RHSA-2024:6879, RHSA-2024:6880, RHSA-2024:6882) to address the SAML signature validation flaw in Keycloak XMLSignatureUtil class.
Template by ProjectDiscovery nuclei-templates (iamnoooob, rootxharsh, pdresearch), MIT licensed. View the full template. Scan only systems you are authorised to test.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is of high severity due to its potential to facilitate privilege escalation and user impersonation in systems using SAML for authentication. The core issue stems from improper validation logic in Keycloak's signature validation method, which relies on the position of signatures rather than…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Build of Keycloak | see advisory | RHSA-2024:6888 |
| Red Hat Build of Keycloak | keycloak-saml-core | RHSA-2024:6890 |
| Red Hat build of Keycloak 22 | rhbk/keycloak-operator-bundle:22.0.13-1 | RHSA-2024:6887 |
| Red Hat build of Keycloak 24 | rhbk/keycloak-operator-bundle:24.0.8-1 | RHSA-2024:6889 |
| Red Hat JBoss Enterprise Application Platform 8 | keycloak-saml-core-public | RHSA-2024:8826 |
| Red Hat JBoss Enterprise Application Platform 8.0 for RHEL 8 | eap8-activemq-artemis-0:2.33.0-1.redhat_00015.1.el8eap | RHSA-2024:8823 |
| Red Hat JBoss Enterprise Application Platform 8.0 for RHEL 9 | eap8-activemq-artemis-0:2.33.0-1.redhat_00015.1.el9eap | RHSA-2024:8824 |
| Red Hat Single Sign-On 7 | keycloak-saml-core | RHSA-2024:6886 |
Frequently Asked Questions
Is CVE-2024-8698 in your dependencies?
O3 Security finds CVE-2024-8698 across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.