CVE-2022-24288

8.8 HIGH

📋 TL;DR

This vulnerability allows authenticated users of Apache Airflow's web UI to execute arbitrary operating system commands through improperly sanitized parameters in example DAGs. It affects Apache Airflow installations prior to version 2.2.4 where example DAGs are enabled. Attackers with web UI access can potentially gain full control of the underlying server.

💻 Affected Systems

Products:
  • Apache Airflow
Versions: All versions prior to 2.2.4
Operating Systems: All operating systems running Apache Airflow
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations where example DAGs are enabled (default in many configurations).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing execution of arbitrary commands as the Airflow process user, potentially leading to data theft, lateral movement, or complete system takeover.

🟠

Likely Case

Authenticated attackers execute commands to read sensitive files, install malware, or pivot to other systems in the network.

🟢

If Mitigated

Limited impact if proper network segmentation, least privilege, and monitoring are in place, though command execution would still be possible.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access to the web UI. Public proof-of-concept code exists in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.2.4 and later

Vendor Advisory: https://lists.apache.org/thread/dbw5ozcmr0h0lhs0yjph7xdc64oht23t

Restart Required: Yes

Instructions:

1. Backup your Airflow configuration and DAGs. 2. Upgrade to Apache Airflow 2.2.4 or later using pip: 'pip install --upgrade apache-airflow==2.2.4'. 3. Restart all Airflow services (webserver, scheduler, workers). 4. Verify the upgrade completed successfully.

🔧 Temporary Workarounds

Disable Example DAGs

all

Remove or disable all example DAGs to eliminate the vulnerable code path.

Set load_examples = False in airflow.cfg
Remove example DAGs from the dags folder

Restrict Web UI Access

all

Limit access to the Airflow web UI to trusted users only using network controls.

Configure firewall rules to restrict access to Airflow web server port
Implement IP whitelisting for the web UI

🧯 If You Can't Patch

  • Disable all example DAGs immediately by setting load_examples=False in airflow.cfg
  • Implement strict network segmentation to isolate Airflow instances and restrict web UI access

🔍 How to Verify

Check if Vulnerable:

Check if Airflow version is below 2.2.4 and example DAGs are enabled in airflow.cfg (load_examples=True).

Check Version:

airflow version

Verify Fix Applied:

Verify Airflow version is 2.2.4 or higher and that example DAGs have been removed or disabled.

📡 Detection & Monitoring

Log Indicators:

  • Unusual command execution patterns in system logs
  • Suspicious processes spawned by Airflow user
  • Web UI requests with unusual parameter values

Network Indicators:

  • Outbound connections from Airflow server to unexpected destinations
  • Unusual network traffic patterns from Airflow instances

SIEM Query:

process.name: (bash OR sh OR cmd OR powershell) AND parent.name: (airflow OR gunicorn) AND user: (airflow OR www-data)

🔗 References

📤 Share & Export