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-2026-40948

CVE-2026-40948: Apache Airflow Keycloak CSRF Vulnerability

CVE-2026-40948 is a CSRF flaw in apache-airflow-providers-keycloak that enables session fixation attacks, allowing attackers to harvest victim credentials. This article covers technical details, affected versions, and mitigation.

Published: April 23, 2026

CVE-2026-40948 Overview

A session fixation vulnerability exists in the Keycloak authentication manager within apache-airflow-providers-keycloak. The authentication implementation fails to generate or validate the OAuth 2.0 state parameter during the login and login-callback flow, and does not implement Proof Key for Code Exchange (PKCE). This allows an attacker with a Keycloak account in the same realm to deliver a crafted callback URL to a victim's browser, causing the victim to be logged into the attacker's Airflow session. Any credentials the victim subsequently stores in Airflow Connections become harvestable by the attacker.

Critical Impact

Attackers can perform login-CSRF attacks to capture sensitive credentials stored by victims in Airflow Connections, potentially compromising downstream systems and data pipelines.

Affected Products

  • apache-airflow-providers-keycloak versions prior to 0.7.0
  • Apache Airflow installations using Keycloak authentication
  • Environments with shared Keycloak realms

Discovery Timeline

  • April 18, 2026 - CVE-2026-40948 published to NVD
  • April 20, 2026 - Last updated in NVD database

Technical Details for CVE-2026-40948

Vulnerability Analysis

This vulnerability is classified under CWE-352 (Cross-Site Request Forgery). The root issue stems from improper implementation of the OAuth 2.0 authorization flow in the Keycloak authentication manager. OAuth 2.0 relies on the state parameter as a CSRF token to bind the authorization request to the user's browser session and prevent session fixation attacks. Without this protection, an attacker can initiate an OAuth flow, capture the authorization callback URL, and deliver it to a victim.

The attack requires the attacker to have a valid account in the same Keycloak realm as the victim. Once the victim clicks the malicious callback URL, they are authenticated into the attacker's Airflow session rather than their own. This is particularly dangerous in workflow orchestration platforms like Apache Airflow, where users commonly store database credentials, API keys, and service account tokens in Airflow Connections.

Root Cause

The Keycloak authentication manager implementation omits two critical OAuth 2.0 security mechanisms:

  1. Missing state parameter validation: The OAuth 2.0 specification recommends using the state parameter as an anti-CSRF token. The vulnerable implementation neither generates a unique state value during authorization requests nor validates it upon callback, allowing attackers to inject their own authorization responses.

  2. Absence of PKCE (Proof Key for Code Exchange): PKCE provides an additional layer of protection against authorization code interception attacks by requiring the client to prove possession of a code verifier. Without PKCE, the authorization code becomes susceptible to interception and replay.

Attack Vector

The attack leverages network-based access and requires user interaction. An attacker within the same Keycloak realm initiates an OAuth login flow to obtain a valid authorization callback URL containing their authorization code. The attacker then delivers this crafted URL to a victim through social engineering methods such as phishing emails or malicious links. When the victim clicks the link, their browser completes the OAuth flow using the attacker's authorization code, logging the victim into the attacker's Airflow session.

From this point, the attacker can monitor the session for any credentials the victim adds to Airflow Connections, effectively harvesting sensitive authentication data for databases, cloud services, and other integrated systems.

Detection Methods for CVE-2026-40948

Indicators of Compromise

  • Unusual login patterns where a single user session receives credentials from multiple geographic locations
  • Airflow Connection modifications occurring from unexpected IP addresses or user agents
  • OAuth callback requests missing the state parameter in application logs
  • Multiple users accessing the same Airflow session concurrently

Detection Strategies

  • Monitor OAuth authentication logs for login requests lacking state parameter validation
  • Implement anomaly detection for Airflow Connection modifications to identify credential harvesting patterns
  • Audit Keycloak authentication events for suspicious callback URL patterns
  • Review application logs for login-callback sequences from different source IPs within short timeframes

Monitoring Recommendations

  • Enable detailed logging for OAuth authentication flows in both Airflow and Keycloak
  • Configure alerts for multiple credential additions within a single session from varying network sources
  • Implement session binding verification to detect session fixation attempts
  • Deploy network traffic analysis to identify crafted callback URL delivery attempts

How to Mitigate CVE-2026-40948

Immediate Actions Required

  • Upgrade apache-airflow-providers-keycloak to version 0.7.0 or later immediately
  • Review Airflow Connection credentials that may have been compromised and rotate affected secrets
  • Audit recent authentication logs for signs of session fixation attacks
  • Notify users to be cautious of unexpected OAuth login links

Patch Information

The vulnerability has been addressed in apache-airflow-providers-keycloak version 0.7.0. The fix implements proper state parameter generation and validation in the OAuth 2.0 flow, along with PKCE support. Technical details of the patch are available in the GitHub Pull Request. Additional information can be found in the Apache Mailing List Thread and the Openwall OSS-Security Update.

Workarounds

  • Consider temporarily disabling Keycloak authentication and using an alternative authentication mechanism until the upgrade can be completed
  • Implement network-level controls to restrict access to Airflow OAuth callback endpoints to trusted sources
  • Deploy Web Application Firewall (WAF) rules to validate OAuth state parameters at the network perimeter
  • Educate users about the risks of clicking unexpected authentication links and implement security awareness training

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

  • Vulnerability Details
  • TypeCSRF

  • Vendor/TechApache Airflow

  • SeverityMEDIUM

  • CVSS Score5.4

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-352
  • Technical References
  • GitHub Pull Request

  • Apache Mailing List Thread

  • Openwall OSS-Security Update
  • Related CVEs
  • CVE-2026-41016: Apache Airflow SMTP Information Disclosure

  • CVE-2026-40690: Apache Airflow Information Disclosure Flaw

  • CVE-2026-38743: Apache Airflow Info Disclosure Bug

  • CVE-2026-25917: Apache Airflow RCE 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