# apache-airflow-providers-keycloak: Missing OAuth 2.0 State and PKCE Enables Login CSRF and Session Fixation

Advisory record · `GHSA-5w6h-pjw6-wvc6`

- **Identifiers:** `GHSA-5w6h-pjw6-wvc6` · `CVE-2026-40948` · `PYSEC-2026-2369`
- **State:** Confirmed
- **Severity:** CVSS 5.4 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-352](https://cwe.mitre.org/data/definitions/352.html)
- **Tags:** [Cross-site request forgery (CSRF)](https://agentprime.io/advisories/tag/csrf.md)
- **Published:** 18 Apr 2026
- **Updated:** 13 Jul 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 18 Apr 2026, 15:34 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `apache-airflow-providers-keycloak` (PyPI): affected `>=0.0.1, <0.7.0`; fixed in `0.7.0`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> The apache-airflow-providers-keycloak package is vulnerable in versions before 0.7.0. The Keycloak authentication manager did not generate or validate the OAuth 2.0 state parameter and did not use PKCE during login. An attacker with a Keycloak account in the same realm could send a crafted callback URL to a victim, logging the victim into the attacker's Airflow session, where credentials the victim later stores in Airflow Connections could be captured. Upgrade to version 0.7.0 or later.

Written 6 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 5.4 Medium, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`, from GitHub Advisory Database

- **CISA KEV:** Not listed.
- **EPSS:** 0.0040, the 35th percentile, on 12 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 15:02 UTC: First seen by agentprime
- 31 Oct 2026, 15:02 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-5w6h-pjw6-wvc6)

## Sources

- [GitHub Advisory Database: GHSA-5w6h-pjw6-wvc6](https://github.com/advisories/GHSA-5w6h-pjw6-wvc6)
- [OSV: GHSA-5w6h-pjw6-wvc6](https://osv.dev/vulnerability/GHSA-5w6h-pjw6-wvc6)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40948>
- <https://github.com/apache/airflow/pull/64114>
- <https://github.com/apache/airflow>
- <https://lists.apache.org/thread/kc0odpr70hbqhdb9ksnz42fkqz2xld9q>
- <http://www.openwall.com/lists/oss-security/2026/04/17/14>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-5w6h-pjw6-wvc6>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-5w6h-pjw6-wvc6/>. Everything for agents: <https://agentprime.io/llms.txt>.
