Introduction
A crafted XML payload sent to Keycloak's SAML endpoint can starve the server of worker threads and pin the CPU. One unauthenticated request can become a full denial of service against the authentication gateway that downstream applications depend on. For an organization running Keycloak as its central SSO provider, a single malicious request from an untrusted network could lock every user out of every connected application.
Keycloak is an open-source identity and access management platform for modern applications and services. It provides user federation, strong authentication, user management, and fine-grained authorization. Red Hat backs the project and ships the Red Hat Build of Keycloak for enterprise use, and Keycloak is widely deployed across industries as a foundational SSO and identity brokering layer. Because it is the gateway to application access, any disruption to its availability carries unusually high stakes.
Technical Information
CVE-2026-7307 affects the SAML protocol endpoint that Keycloak exposes. The root cause is that Keycloak does not properly validate whether incoming XML is syntactically correct, a weakness classified as CWE-1286 (Improper Validation of Syntactic Correctness of Input). The class covers software that expects input in a well-defined syntax (here, XML that conforms to the SAML schema) but processes the data without first checking that it conforms.
When a specially crafted XML payload reaches the SAML endpoint, the server tries to parse and process it without adequate validation. The malformed input exhausts server resources. CPU usage spikes, and the pathological parsing ties up the available worker threads. Once the thread pool is exhausted, the Keycloak instance cannot serve any further requests, whether they are legitimate authentication flows or administrative operations.
CVSS Breakdown
The CVSS 3.1 base score is 7.5, with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The metrics break down as follows:
| Metric | Value | Implication |
|---|---|---|
| Attack Vector | Network | Exploitable remotely over any network path to the SAML endpoint |
| Attack Complexity | Low | No special conditions or race windows required |
| Privileges Required | None | No authentication needed |
| User Interaction | None | No victim action required |
| Confidentiality Impact | None | No data disclosure |
| Integrity Impact | None | No data modification |
| Availability Impact | High | Complete service disruption |
With no authentication required, low complexity, and a high impact on availability, this vulnerability is an easy target for automated scanning and exploitation tools.
Attack Flow
The available advisory data points to a simple exploitation sequence:
- The attacker finds a Keycloak instance with the SAML endpoint exposed to the network.
- The attacker builds a specially crafted XML payload designed to trigger pathological processing in the SAML parser.
- The attacker sends the payload to the SAML endpoint without any authentication credentials.
- The Keycloak server starts processing the malformed XML, which consumes CPU cycles and occupies worker threads.
- As the worker threads run out, the server can no longer handle legitimate requests.
- The Keycloak instance is effectively offline, and every SSO-dependent application is disrupted.
The current advisories do not describe the crafted XML itself, including whether it relies on entity expansion, deeply nested structures, or some other XML parsing pathology.
CWE-1286 Context
CWE-1286 describes a failure to check that input follows the expected syntactic rules before processing it. In complex data exchange formats like XML, this weakness can show up as excessive resource consumption during parsing, unexpected error states, or cascading failures. SAML depends heavily on well-formed XML, so any gap in input validation at the parsing stage leaves room for resource exhaustion attacks.
Affected Systems and Versions
The Red Hat advisory identifies the affected package as rhbk/keycloak-rhel9 (the Red Hat Build of Keycloak for RHEL 9). The current advisories do not list specific affected versions or version ranges. As of May 19, 2026, the fix state is "Under investigation", so no patched version is available yet.
Exposure depends mainly on two things: whether the SAML protocol is enabled, and whether the SAML endpoint is reachable from untrusted networks. Deployments that do not use SAML, or that restrict access to the SAML endpoint to trusted clients, have a much smaller attack surface.
Vendor Security History
The Keycloak project has fixed several SAML-related security issues in recent releases. Two examples from 2026:
- CVE-2026-2575: A denial-of-service vulnerability caused by excessive SAMLRequest decompression, addressed in the Keycloak 26.4 release cycle.
- CVE-2026-3047: An authentication bypass in the SAML broker, also resolved in recent releases.
This pattern suggests the SAML subsystem is currently drawing attention from both outside security researchers and the vendor's own remediation work. Given how often SAML vulnerabilities have come up, organizations that rely on Keycloak's SAML support should follow release notes and security advisories closely.



