Keycloak Auth in apache-airflow-providers-keycloak: CSRF, no state/PKCE (<0.7.0)
CVE-2026-40948 Published on April 18, 2026

Apache Airflow: OAuth Login CSRF — Missing State Parameter in Keycloak Auth Manager
The Keycloak authentication manager in `apache-airflow-providers-keycloak` did not generate or validate the OAuth 2.0 `state` parameter on the login / login-callback flow, and did not use PKCE. An attacker with a Keycloak account in the same realm could deliver a crafted callback URL to a victim's browser and cause the victim to be logged into the attacker's Airflow session (login-CSRF / session fixation), where any credentials the victim subsequently stored in Airflow Connections would be harvestable by the attacker. Users are advised to upgrade `apache-airflow-providers-keycloak` to 0.7.0 or later.

Vendor Advisory NVD

Weakness Type

What is a Session Riding Vulnerability?

The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request. When a web server is designed to receive a request from a client without any mechanism for verifying that it was intentionally sent, then it might be possible for an attacker to trick a client into making an unintentional request to the web server which will be treated as an authentic request. This can be done via a URL, image load, XMLHttpRequest, etc. and can result in exposure of data or unintended code execution.

CVE-2026-40948 has been classified to as a Session Riding vulnerability or weakness.


Products Associated with CVE-2026-40948

Want to know whenever a new CVE is published for Apache AirFlow? stack.watch will email you.

 

Affected Versions

Apache Software Foundation Apache Airflow: