CVE-2026-137435: Keycloak-services: keycloak-services: case-distinct saml nameid allows authentication as another account

Published Nov 26, 2026
·
Updated

A flaw was found in the SAML identity brokering component of Keycloak. When Keycloak is configured to use a database with case-insensitive collation, it may incorrectly match a SAML subject name to an existing user account if the names differ only by case. This issue allows an attacker to log in as a different user by providing a case-distinct version of a victim's username in a signed SAML assertion, leading to unauthorized account access.

Other sources

A vulnerability was found in Keycloak where the SAML identity provider brokering mechanism fails to perform a case-sensitive validation of the asserted subject. When a realm brokers logins from a SAML identity provider, Keycloak looks up the federated identity link using a plain database equality query against the FEDERATEDUSERID column. If the underlying database uses a case-insensitive collation, a signed SAML assertion containing a subject that differs only in case (e.g., Alice vs alice) will resolve to the same federated identity link. Keycloak does not perform a secondary case-sensitive check on the returned value. An attacker can exploit this to obtain a valid access token for a victim's account, effectively bypassing authentication for the intended user.

— Red Hat

Affected Software

1 affected component
Red Hat Keycloak

Event History

Nov 26, 2026
Data Sourced
via Red Hat·11:06 AM
DescriptionSeverityAffected Software
CVE Published
via MITRE·11:35 AM
Data Sourced
via MITRE·11:35 AM
DescriptionWeakness

Frequently Asked Questions

1

Which deployments are affected?

The issue applies to realms that broker logins from a SAML identity provider and use a database with case-insensitive collation. The federated identity lookup against the FEDERATED_USER_ID column can then treat names differing only by case as equal.

2

What does an attacker need to exploit this?

An attacker needs to provide a signed SAML assertion whose subject is a case-distinct variant of a victim's username, such as "Alice" instead of "alice."

3

What is the impact of successful exploitation?

The attacker can obtain a valid access token for the victim's account and access that account without authenticating as the victim.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203