Junglewise Threat Intelligence

CVE-2026-42252: Apache Airflow command injection via unsafe documentation example

CVE-2026-42252 · Severity: critical · CVSS 9.1 · Published 2026-06-01

Technologies: Apache Airflow, apache-airflow (PyPI). Vendors: Apache, Apache Software Foundation, PyPI.

Executive brief

Apache Airflow is an open-source platform used to schedule and monitor complex workflows. A vulnerability was identified in its official documentation that provided an insecure code example for passing parameters to tasks. If developers used this example verbatim, an attacker with permission to trigger workflows could execute malicious commands on the underlying server, potentially leading to a full system takeover or unauthorized data access.

Technical details

The vulnerability stems from an insecure Jinja2 template pattern in the official Apache Airflow documentation for 'Passing Parameters when triggering Dags'. The documentation suggested using BashOperator(bash_command="echo value: {{ dag_run.conf['conf1'] }}") without proper shell quoting or sanitization. An authenticated attacker with 'Dag.can_trigger' permissions can exploit this by providing a malicious payload (e.g., shell metacharacters) in the 'conf' field of a DAG trigger request. This results in arbitrary command execution (RCE) via os.exec on the Airflow worker. The fix involves updating documentation to use explicit shell-quoting and upgrading to version 3.2.2.

Affected products

  • Apache Software Foundation Apache Airflow >= 3.0.0, < 3.2.2

Timeline

  • 2026-03-24: patched: Documentation fix merged in PR 64129
  • 2026-06-01: disclosed: CVE-2026-42252 published
  • 2026-06-01: advisory: GHSA-c85c-g9wv-pph2 published

References

Related threats