CVE-2026-18215
Received Received - Intake

Microsoft Account Token Exchange Access Bypass in Keycloak

Vulnerability report for CVE-2026-18215, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-31

Last updated on: 2026-07-31

Assigner: Red Hat, Inc.

Description

Keycloak provides a way to let users log in using Microsoft accounts while restricting access to a specific organization (tenant). A flaw was discovered where this restriction is ignored when using the token exchange feature. This means an attacker with a valid Microsoft token from a completely different organization could gain access to the Keycloak realm, potentially accessing sensitive data or performing unauthorized actions.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-31
Last Modified
2026-07-31
Generated
2026-07-31
AI Q&A
2026-07-31
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
keycloak keycloak *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-287 When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Keycloak allows users to log in via Microsoft accounts with tenant restrictions to limit access to specific organizations. This vulnerability occurs when using the token exchange feature, which fails to enforce tenant restrictions. An attacker with a valid Microsoft token from any tenant can bypass these restrictions and gain access to the Keycloak realm, potentially accessing sensitive data or performing unauthorized actions.

Detection Guidance

Check Keycloak logs for unusual token exchange requests or failed tenant validation attempts. Monitor for access from Microsoft tokens not matching your configured tenant ID. Review authentication logs for unexpected identity provider usage.

Impact Analysis

If you use Keycloak with Microsoft account logins and tenant restrictions, attackers could exploit this flaw to access your realm. This may lead to unauthorized data access, identity theft, or modification of user information. The impact depends on the sensitivity of the data protected by Keycloak.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive data, violating compliance requirements under GDPR and HIPAA. GDPR mandates strict access controls for personal data, while HIPAA requires protection of health information. Exploitation may result in non-compliance, legal penalties, or data breaches.

Mitigation Strategies

Update Keycloak to the latest version that includes tenant validation for token exchange. Configure strict tenant restrictions in Keycloak's Microsoft identity provider settings. Disable token exchange if not required.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-18215. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart