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
    • 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-3782

CVE-2022-3782: Keycloak Path Traversal Vulnerability

CVE-2022-3782 is a path traversal flaw in Redhat Keycloak caused by improper URL validation in redirect handling. Attackers can exploit this to bypass validation and access sensitive information or URLs within the domain.

Published: February 17, 2026

CVE-2022-3782 Overview

A path traversal vulnerability exists in Red Hat Keycloak due to improper validation of URLs included in redirects. The flaw allows attackers to bypass validation through double URL encoding, potentially enabling access to other URLs and sensitive information within the domain. This vulnerability affects any client configuration that utilizes wildcard characters in the Valid Redirect URIs field, creating significant exposure for organizations relying on Keycloak for identity and access management.

Critical Impact

Attackers can exploit this path traversal vulnerability to bypass URL validation, access sensitive information, and potentially conduct further attacks against Keycloak-protected resources.

Affected Products

  • Red Hat Keycloak 20.0.2
  • Red Hat Keycloak versions with wildcard configurations in Valid Redirect URIs

Discovery Timeline

  • 2023-01-13 - CVE-2022-3782 published to NVD
  • 2025-04-09 - Last updated in NVD database

Technical Details for CVE-2022-3782

Vulnerability Analysis

This vulnerability stems from insufficient URL validation within Keycloak's redirect handling mechanism. When processing redirect URLs, Keycloak fails to properly decode and validate double-encoded URL sequences, allowing attackers to craft malicious requests that bypass the intended security controls.

The flaw is particularly dangerous in configurations where administrators have configured Valid Redirect URIs using wildcard patterns. Wildcard configurations are commonly used to simplify redirect URI management across multiple subdomains or paths, but this convenience creates an attack surface when combined with the double URL encoding bypass.

The attack can be executed remotely without authentication and requires no user interaction, making it highly exploitable in internet-facing Keycloak deployments. Successful exploitation allows attackers to redirect users to arbitrary URLs within the same domain, potentially leading to credential theft, phishing attacks, or access to internal resources.

Root Cause

The root cause is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), commonly known as Path Traversal. Keycloak's URL validation logic does not account for double URL encoding scenarios, where path traversal sequences like ../ are encoded twice (e.g., %252e%252e%252f). The first decoding pass produces a still-encoded string that passes validation, while subsequent processing decodes it again, revealing the malicious path traversal sequence.

Attack Vector

The attack is network-based and can be executed by crafting a specially designed redirect URL that appears legitimate after initial validation but resolves to an unauthorized path after full decoding. An attacker would construct a URL containing double-encoded path traversal sequences and submit it through Keycloak's OAuth/OIDC authentication flow.

The attack exploits the redirect validation during authorization code or token requests, where Keycloak compares the provided redirect URI against the configured Valid Redirect URIs. By using double encoding, the attacker bypasses the wildcard pattern matching, allowing redirection to unintended destinations within the application's domain structure.

Detection Methods for CVE-2022-3782

Indicators of Compromise

  • Unusual redirect URLs containing encoded sequences like %252e, %252f, or %2e%2e%2f in Keycloak access logs
  • Authentication requests with abnormally long or complex redirect_uri parameters
  • Multiple failed or suspicious redirect attempts from the same source IP targeting OAuth endpoints
  • Access to unexpected paths or resources following authentication flows

Detection Strategies

  • Monitor Keycloak access logs for requests containing double-encoded characters in the redirect_uri parameter
  • Implement Web Application Firewall (WAF) rules to detect and block path traversal patterns including URL-encoded variants
  • Configure alerting for OAuth/OIDC authentication flows with redirect URIs that differ significantly from expected patterns
  • Enable detailed logging on Keycloak authentication events to capture full request parameters

Monitoring Recommendations

  • Audit Valid Redirect URI configurations across all Keycloak clients for wildcard usage
  • Implement real-time log analysis for path traversal indicators in authentication endpoints
  • Review Keycloak audit logs periodically for anomalous redirect patterns
  • Deploy endpoint monitoring to track authentication flow anomalies

How to Mitigate CVE-2022-3782

Immediate Actions Required

  • Review and update all Keycloak client configurations to remove or restrict wildcard usage in Valid Redirect URIs
  • Apply the latest Keycloak security patches that address double URL encoding validation
  • Implement WAF rules to block requests containing encoded path traversal sequences
  • Audit existing redirect URI configurations and replace wildcards with explicit, fully-qualified URIs where possible

Patch Information

Red Hat has released security updates addressing this vulnerability. Administrators should consult the Red Hat CVE-2022-3782 Advisory for specific patch versions and upgrade instructions. Upgrade to a patched version of Keycloak as the primary remediation strategy.

Workarounds

  • Remove wildcard characters from Valid Redirect URIs configurations and use explicit, fully-qualified redirect URIs instead
  • Implement network-level filtering to detect and block requests containing double-encoded path traversal sequences
  • Deploy a reverse proxy or WAF with URL normalization capabilities to decode URLs before they reach Keycloak
  • Restrict access to Keycloak administration interfaces and OAuth endpoints to trusted networks where feasible
bash
# Review Keycloak client redirect URI configurations
# Example: Audit clients using Keycloak Admin CLI
kcadm.sh get clients -r your-realm --fields id,clientId,redirectUris | grep -E "\*|%"

# Replace wildcard URIs with explicit paths in client configuration
# Before: https://example.com/*
# After:  https://example.com/callback, https://example.com/auth/callback

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechRedhat Keycloak

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.14%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Vendor Resources
  • Red Hat CVE-2022-3782 Advisory
  • Related CVEs
  • CVE-2023-0091: Redhat Keycloak Auth Bypass Vulnerability

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

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

  • CVE-2023-4918: Keycloak Information Disclosure Flaw
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