Improper Signature VerificationWeakness · CWE-347

CVE-2024-8698

HIGH · 7.7 CVSS v3.1 Published 2024-09-19
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
83/100
Remediation priority · High
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A flaw in Keycloak's XMLSignatureUtil class causes SAML signature validation to determine signature scope based on the position of the signature element in the XML document rather than properly parsing the Reference element. This allows attackers to craft malicious SAML responses where the signature appears to cover the full document but actually only covers a subset, bypassing validation and potentially enabling privilege escalation or impersonation.

MitigationApply the vendor-released security patch or upgrade to a fixed Keycloak version; review authentication logs for suspicious SAML response patterns and consider implementing additional application-layer validation of SAML assertions.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
High
Privileges
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify if Keycloak is deployed
    Check for Keycloak installation by looking for keycloak-server, keycloak services, or the keycloak.war file in application servers. Alternatively, query the running processes or container images for keycloak binaries.
    Affected if Keycloak is not present in the environment
  2. Determine the Keycloak version
    Check the installed Keycloak version by reviewing the keycloak server logs on startup, the manifest within keycloak.war, the product version in the admin console 'Server Info' page, or the version reported by the /health endpoint if exposed.
    Affected if The version falls within the affected range and no patch has been applied
  3. Confirm SAML authentication is configured
    Review Keycloak realm settings for any Identity Providers configured with SAML protocol, or check for SAML clients (Service Providers) defined in the realm. Inspect the realm XML configuration or use the Admin API to list idp-mappers and client-definitions.
    Affected if SAML identity providers or SAML clients are configured and active in at least one realm
  4. Verify the XMLSignatureUtil vulnerability is present
    Inspect the Keycloak installation for the XMLSignatureUtil class file (typically in org/keycloak/saml/ or similar package paths). Check if the JAR containing this class matches the unpatched version by reviewing class file timestamps or hashes if available, or by examining the source code if accessible.
    Affected if The XMLSignatureUtil class contains the flaw where signature scope is determined by element position rather than proper Reference parsing

A user is affected if they run an unpatched Keycloak version within the affected range and have SAML authentication (identity provider or service provider) configured in their realm.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Apply the vendor-released security patch or upgrade to a fixed Keycloak version; review authentication logs for suspicious SAML response patterns and consider implementing additional application-layer validation of SAML assertions.

Have this fixed Scoped from the published advisory
  • Consultation3.0 h
  • Implementation10.0 h
  • Testing6.0 h
  • Review / QA3.0 h
22.0 hours of engineering $3,840
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,144.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-8698 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-8698 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data