Fedora Account System
Red Hat Associate
Red Hat Customer
A padding oracle vulnerability was discovered in the SAML identity brokering implementation of Keycloak. When Keycloak is configured as a SAML service provider, it processes incoming SAML responses that contain encrypted assertions. If a response is unsigned, Keycloak performs decryption of the assertion before any integrity or signature checks are executed. The endpoint returns a distinguishable empty HTTP 400 error when decryption fails due to an invalid CBC padding, compared to other responses when decryption succeeds. An unauthenticated remote attacker who has captured an encrypted SAML assertion can exploit this discrepancy to perform a padding oracle attack. By sending a large number of crafted requests and observing the response patterns, the attacker can recover the plaintext of the encrypted assertion byte by byte. This allows the attacker to access sensitive user identity information and attributes, bypassing the confidentiality protections provided by assertion encryption.