Vulnerability record · CVE-2022-40127 · published 14 November 2022
CVE-2022-40127: Apache Airflow example DAGs allow command injection via run_id
Apache · Airflow
Example DAGs shipped with Apache Airflow accept a manually supplied run_id parameter and pass it into command execution without adequate sanitization, allowing code injection. Any user with UI access who can trigger DAGs can run arbitrary commands on the Airflow worker. The flaw affects Airflow versions prior to 2.4.0 and is rated CVSS 8.8 (HIGH).
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.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Automated analysis
high priorityCVSS 8.8 with a very high EPSS percentile and a straightforward authenticated path to remote command execution, though no KEV listing or confirmed in-the-wild exploitation is recorded.
What it is
Example DAGs shipped with Apache Airflow accept a manually supplied run_id parameter and pass it into command execution without adequate sanitization, allowing code injection. Any user with UI access who can trigger DAGs can run arbitrary commands on the Airflow worker. The flaw affects Airflow versions prior to 2.4.0 and is rated CVSS 8.8 (HIGH).
Impact
An attacker gains arbitrary command execution in the context of the Airflow worker, which can lead to data theft, lateral movement, and full compromise of the scheduling environment.
Attack surface
Reachable over the network through the Airflow web UI by an authenticated user who has permission to trigger DAGs; no user interaction beyond supplying the crafted run_id is required.
Exploitation
Not listed in CISA KEV and no public exploit tag is present in the references, but EPSS is very high (0.85653, 99.7th percentile), indicating elevated likelihood of exploitation.
What to do
- Upgrade Apache Airflow to 2.4.0 or later, which contains the patch referenced in PR 25960.
- If immediate upgrade is not possible, remove or disable the affected example DAGs and restrict DAG-trigger permissions to trusted users.
- Audit Airflow user roles and remove trigger access from accounts that do not require it.
- Monitor Airflow worker logs for unexpected subprocess or shell activity originating from DAG runs.
Detection
- Review Airflow task logs for run_id values containing shell metacharacters or unexpected command strings.
- Alert on new or unusual child processes spawned by the Airflow worker or scheduler.
- Monitor for outbound connections from Airflow worker hosts to unfamiliar destinations following DAG triggers.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| http://www.openwall.com/lists/oss-security/2022/11/14/2 | Mailing ListThird Party Advisory |
| https://github.com/apache/airflow/pull/25960 | PatchThird Party Advisory |
| https://lists.apache.org/thread/cf132hgm6jvzvsbpsozl3plf1r4cwysy | Mailing ListThird Party Advisory |
| http://www.openwall.com/lists/oss-security/2022/11/14/2 | Mailing ListThird Party Advisory |
| https://github.com/apache/airflow/pull/25960 | PatchThird Party Advisory |
| https://lists.apache.org/thread/cf132hgm6jvzvsbpsozl3plf1r4cwysy | Mailing ListThird Party Advisory |
Track CVE-2022-40127 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2022-40127), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.