The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-1245

CVE-2022-1245: Redhat Keycloak Privilege Escalation Flaw

CVE-2022-1245 is a privilege escalation vulnerability in Redhat Keycloak's token exchange feature. Missing authorization allows unauthorized access to additional services. This article covers technical details, impact, and mitigation.

Published: February 17, 2026

CVE-2022-1245 Overview

A privilege escalation vulnerability exists in the token exchange feature of Red Hat Keycloak. This flaw stems from missing authorization checks that allow a client application holding a valid access token to exchange tokens for any target client by simply passing the client_id of the target. This could enable an attacker to gain unauthorized access to additional services and resources within the Keycloak-protected environment.

Critical Impact

Attackers with a valid access token can escalate privileges by exchanging tokens for any target client, potentially gaining unauthorized access to sensitive services and bypassing intended access controls.

Affected Products

  • Red Hat Keycloak (all versions prior to patch)

Discovery Timeline

  • 2022-07-08 - CVE CVE-2022-1245 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-1245

Vulnerability Analysis

This vulnerability is classified under CWE-862 (Missing Authorization) and CWE-639 (Authorization Bypass Through User-Controlled Key). The token exchange feature in Keycloak is designed to allow clients to exchange their access tokens for tokens that can be used with other clients or services. However, the implementation fails to properly validate whether the requesting client is authorized to obtain tokens for the specified target client.

The flaw allows any authenticated client with a valid access token to request token exchange operations targeting any other client in the Keycloak realm. This is particularly dangerous in multi-tenant environments or deployments where different clients have varying levels of access to sensitive resources.

Root Cause

The root cause of this vulnerability is missing authorization validation in the token exchange endpoint. When a token exchange request is processed, Keycloak fails to verify that the requesting client has explicit permission to exchange tokens for the specified client_id target. This missing check allows any client with a valid token to impersonate or gain access privileges of any other client in the system.

Attack Vector

An attacker exploiting this vulnerability would need initial access to a valid access token for any client within the Keycloak realm. The attack can be executed remotely over the network without any user interaction. The attacker would craft a token exchange request specifying the client_id of a more privileged target client, and Keycloak would issue tokens granting access to that target client's resources.

The attack flow involves:

  1. Obtaining a valid access token for a low-privilege client
  2. Sending a token exchange request to the Keycloak token endpoint
  3. Specifying the client_id of a target client with higher privileges
  4. Receiving tokens that grant unauthorized access to the target client's resources

For detailed technical information, refer to the GitHub Security Advisory.

Detection Methods for CVE-2022-1245

Indicators of Compromise

  • Unusual token exchange requests targeting high-privilege clients from low-privilege client applications
  • Spike in token exchange activity from specific clients that historically have not used this feature
  • Access logs showing a client accessing resources it should not have permission to reach
  • Token exchange requests where the requested_token_type or audience parameters reference unexpected target clients

Detection Strategies

  • Monitor Keycloak audit logs for token exchange events and correlate with expected client behavior
  • Implement alerting on token exchange requests where the source client differs from typical patterns
  • Review access logs for anomalous cross-client resource access patterns
  • Deploy network-level monitoring to detect unusual traffic patterns to protected services

Monitoring Recommendations

  • Enable detailed audit logging in Keycloak for all token operations
  • Set up real-time alerts for token exchange requests involving sensitive or administrative clients
  • Regularly review token exchange configurations and permissions across all clients
  • Implement behavioral analysis to detect clients accessing resources outside their normal scope

How to Mitigate CVE-2022-1245

Immediate Actions Required

  • Update Red Hat Keycloak to the latest patched version immediately
  • Review and audit all token exchange policies configured in your Keycloak deployment
  • Disable token exchange functionality for clients that do not require it
  • Implement explicit allow-lists for token exchange permissions between clients

Patch Information

Red Hat has released security updates to address this vulnerability. Organizations should update their Keycloak installations to the latest available version. Refer to the GitHub Security Advisory for specific version information and patch details.

Workarounds

  • Disable the token exchange feature entirely if not required for your deployment
  • Implement strict fine-grained permissions for token exchange at the client level
  • Use network segmentation to limit which clients can reach the token endpoint
  • Deploy an API gateway or web application firewall to filter and monitor token exchange requests
bash
# Review token exchange configuration in Keycloak
# Navigate to Clients > [Client Name] > Permissions
# Verify token-exchange permission is properly configured with explicit policies
# Disable token exchange for clients that do not require it by removing the permission

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechRedhat Keycloak

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.42%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-862

  • CWE-639
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2020-14389: Redhat Keycloak Privilege Escalation

  • CVE-2023-0091: Redhat Keycloak Auth Bypass Vulnerability

  • CVE-2023-0105: Redhat Keycloak Auth Bypass Vulnerability

  • CVE-2022-3782: Keycloak Path Traversal Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English