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

Source: https://junglewise.ai/threats/cve-2026-42252-apache-airflow-command-injection-via-unsafe-documentation-example  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-01. Updated: 2026-07-09  
License: CC BY 4.0 with a link back

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

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.

Technologies: [Apache Airflow](https://junglewise.ai/threats/technologies/airflow), [apache-airflow (PyPI)](https://junglewise.ai/threats/technologies/apache-airflow). Vendors: [Apache](https://junglewise.ai/threats/vendors/apache), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-42252 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-42252 being exploited in the wild.

**How severe is CVE-2026-42252?** Critical severity, with a CVSS score of 9.1, published 1 June 2026.

**Which products and versions are affected?** Apache Airflow Before 3.2.2; apache-airflow (PyPI) >= 3.0.0, < 3.2.2, ECOSYSTEM:introduced=3.0.0,fixed=3.2.2.

**Is there a fix for CVE-2026-42252?** Yes. apache-airflow (PyPI): upgrade to 3.2.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-42252 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-42252?** Check whether you run Apache Airflow or apache-airflow (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- apache-airflow (PyPI): upgrade to 3.2.2 or later

  ```sh
  pip install "apache-airflow>=3.2.2"
  ```


## 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

## Identifiers

- CVE-2026-42252
- GHSA-c85c-g9wv-pph2
- PYSEC-2026-184

## 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

- [https://github.com/apache/airflow/pull/64129](https://github.com/apache/airflow/pull/64129)
- [https://lists.apache.org/thread/8f4sc0rfn154jprmnwtmlst4p9zfw3w7](https://lists.apache.org/thread/8f4sc0rfn154jprmnwtmlst4p9zfw3w7)
- [https://github.com/pypa/advisory-database/tree/main/vulns/apache-airflow/PYSEC-2026-184.yaml](https://github.com/pypa/advisory-database/tree/main/vulns/apache-airflow/PYSEC-2026-184.yaml)

## Related threats

- [Apache Airflow incomplete deserialization check bypass in scheduler](https://junglewise.ai/threats/cve-2026-96285-apache-airflow-3-3-1-shipped-a-fix-for-that-checks-the-scheduler)
- [Apache Airflow scheduler XCom deserialization privilege escalation](https://junglewise.ai/threats/cve-2026-86829-apache-airflow-s-scheduler-fully-deserializes-xcom-values-written)
- [Apache Airflow CLI audit log secrets exposure](https://junglewise.ai/threats/cve-2026-86468-apache-airflow-s-cli-records-its-arguments-in-the-audit-log-but)
- [Apache Airflow unsafe deserialization in deadline alert fields](https://junglewise.ai/threats/cve-2026-82337-apache-airflow-rebuilt-deadline-alert-fields-through-generic)
- [Apache Airflow Task SDK secret cache key collision in multi-team deployments](https://junglewise.ai/threats/cve-2026-76185-apache-airflow-s-task-sdk-secret-cache-built-its-keys-from-the)
