Keycloak SAML Brokering NotOnOrAfter Timestamp Validation Vulnerability

Vulnerability

A vulnerability exists in Keycloak's SAML brokering feature. When Keycloak acts as a client in a SAML configuration, it does not properly validate the 'NotOnOrAfter' timestamp in the 'SubjectConfirmationData'. This oversight allows an attacker to prolong the validity of SAML responses, potentially leading to longer-than-expected session times or increased resource usage.

Impact

Exploitation of this vulnerability could result in extended session durations or higher resource consumption.

Reproduction

To reproduce this vulnerability, configure Keycloak to act as a SAML client. When a SAML response is received, the 'NotOnOrAfter' timestamp in the 'SubjectConfirmationData' will not be validated. This can be observed by sending a SAML response with a 'NotOnOrAfter' timestamp that is deliberately set to a later time, allowing the response to be considered valid for a longer period than intended.

Added: Jan 26, 2026, 8:20 PM
Updated: Jan 26, 2026, 8:20 PM

Vulnerability Rating

Custom Algorithm
spread
5.2
impact
1.7
exploitability
7.5
remediation
0.0
relevance
2.3
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.