CVE-2026-40948: apache-airflow-providers-keycloak Missing OAuth 2.0 State And Vulnerability
MODERATECVE-2026-40948 is a MODERATE (CVSS 5.4) missing oauth 2.0 state and vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting apache-airflow-providers-keycloak libraries in the PyPI ecosystem. The issue involves missing oauth 2.0 state and pkce enables login csrf and session fixation. Remediation is available by upgrading affected packages to version 0.7.0.
CVE-2026-40948 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-40948
To remediate this vulnerability, upgrade all affected apache-airflow-providers-keycloak dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install apache-airflow-providers-keycloak>=0.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show apache-airflow-providers-keycloak
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-40948, inspect your installed packages using pip:
pip show apache-airflow-providers-keycloak
Analyze the terminal output to locate any version of apache-airflow-providers-keycloak in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), your application is affected.
Note: The pip show apache-airflow-providers-keycloak command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In apache-airflow-providers-keycloak, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-40948 Affected apache-airflow-providers-keycloak Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
apache-airflow-providers-keycloak
|
PyPI |
≥ 0.0.1
< 0.7.0
|
0.7.0
|
References
Frequently Asked Questions
What is CVE-2026-40948?
Which apache-airflow-providers-keycloak versions are affected?
What version fixes CVE-2026-40948?
Is apache-airflow-providers-keycloak affected?
What is the CVSS score of CVE-2026-40948?
What CWE is associated with CVE-2026-40948?
How can I check PyPI dependencies for CVE-2026-40948?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5w6h-pjw6-wvc6",
"modified" : "2026-04-22T17:36:41Z",
"published" : "2026-04-18T15:34:15Z",
"aliases" : [ "CVE-2026-40948" ],
"summary" : "apache-airflow-providers-keycloak: Missing OAuth 2.0 State and PKCE Enables Login CSRF and Session Fixation",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "apache-airflow-providers-keycloak"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1"
}, {
"fixed" : "0.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40948"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/airflow/pull/64114"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/airflow"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/kc0odpr70hbqhdb9ksnz42fkqz2xld9q"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2026/04/17/14"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-352" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-22T17:36:41Z",
"nvd_published_at" : "2026-04-18T14:16:10Z"
}
}