Apache Airflow AWS Auth Manager SAML Host Header Injection (CVE-2026-25604)
by Sungwuk Jung (PoC repository: John-Jung) · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-25604
- Category
- web
- Affected product
- Apache Airflow — apache-airflow-providers-amazon (AWS Auth Manager)
- Affected versions
- 8.0.0 - 9.21.x (fixed in 9.22.0)
- Disclosed
- 2026-07-05
- Patch status
- patched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-04 |
| Author / Researcher | Sungwuk Jung (PoC repository: John-Jung) |
| CVE / Advisory | CVE-2026-25604 |
| Category | web |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | saml, host-header-injection, authentication-bypass, apache-airflow, aws-iam-identity-center, cwe-346, origin-validation, token-replay |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Apache Airflow — apache-airflow-providers-amazon (AWS Auth Manager) |
| Versions Affected | 8.0.0 - 9.21.x (fixed in 9.22.0) |
| Language / Platform | Python (Flask mock server for PoC); target is a Python web application |
| Authentication Required | No (attacker abuses the pre-authentication login redirect flow) |
| Network Access Required | Yes |
Summary
CVE-2026-25604 is a CWE-346 origin validation error in Apache Airflow’s AWS Auth Manager. When building the SAML AssertionConsumerService (ACS) callback URL for a login request, the code reads the HTTP Host header directly from the incoming request instead of using the configured instance base URL. An attacker who can influence the Host header seen by Airflow (e.g. via a reverse proxy misconfiguration, phishing link, or direct request) can cause the SAML AuthnRequest to instruct the identity provider (AWS IAM Identity Center) to deliver the signed SAML response to an attacker-controlled host. The attacker then replays the captured SAML response against the legitimate Airflow instance to authenticate as the victim, or reuses a response across multiple Airflow instances that share the IdP but have different access controls. The included PoC is a mock vulnerable Airflow SAML endpoint (Flask + python3-saml) that reproduces the vulnerable _prepare_flask_request() logic for demonstration against a real AWS IAM Identity Center SAML app.
Vulnerability Details
Root Cause
aws_auth_manager.py’s _prepare_flask_request() builds the SAML SP’s ACS URL using request.headers.get("Host", request.host) — an attacker-controlled value — rather than the administrator-configured AIRFLOW__API__BASE_URL, so the identity provider is told to deliver the SAML response to whatever host the client claims.
Attack Vector
- Attacker sends (or lures a victim into sending) a login request to the Airflow instance with a spoofed
Hostheader (e.g.Host: attacker.com:9090). - Airflow’s AWS Auth Manager builds a SAML
AuthnRequestwhose ACS URL points toattacker.com:9090/login_callbackinstead of the real instance. - The identity provider (AWS IAM Identity Center) authenticates the victim normally and redirects the signed SAML response to the attacker-controlled ACS URL.
- Attacker captures the valid SAML response from their own server.
- Attacker replays the captured SAML response to the real Airflow instance’s
/login_callback, authenticating as the victim (or replays it against a different Airflow instance sharing the same IdP application, bypassing that instance’s separate access controls).
Impact
Authentication bypass allowing an attacker to gain authenticated access to Airflow as another user, exposing DAG configurations, stored connection credentials, and pipeline data, plus potential cross-instance access control bypass in multi-tenant deployments.
Environment / Lab Setup
Target: apache-airflow-providers-amazon 8.0.0-9.21.x with AWS Auth Manager + SAML via AWS IAM Identity Center
Attacker: Python 3.8+, flask, python3-saml (pip install flask python3-saml), curl
Proof of Concept
PoC Script
See
mock_airflow.pyin this folder.
| |
The mock server reproduces Airflow’s vulnerable _prepare_flask_request() logic, building the SAML ACS URL from the client-supplied Host header. Running it and sending a login request with a spoofed Host header shows the resulting SAML AuthnRequest pointing its ACS callback at the attacker-controlled host instead of the real server, confirming the injection.
Detection & Indicators of Compromise
Signs of compromise:
- Login requests with unexpected or attacker-domain
Hostheaders hitting/loginor/login_callback - SAML responses being POSTed to
/login_callbackfrom IP ranges inconsistent with the identity provider or victim - Successful authentications immediately following anomalous
Hostheader values in access logs
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade apache-airflow-providers-amazon to 9.22.0 or later, which uses conf.get("api", "base_url") instead of the client-supplied Host header (fix PR #61368) |
| Interim mitigation | Terminate/normalize the Host header at a trusted reverse proxy/load balancer before it reaches Airflow, and reject requests where Host doesn’t match the expected instance hostname |
References
Notes
Mirrored from https://github.com/John-Jung/CVE-2026-25604-PoC on 2026-07-05.
| |