← Vulnerability feed

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).

8.8 CVSS 3.1 High EPSS 86% · top 0.3% CWE-94 · Code injection
8.8CVSS 3.1 base score
86%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
6References
17 Jun 2026Last modified by NVD

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

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

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

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.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2020-13927Apache Airflow Experimental API missing authentication by defaultAirflow's Experimental API defaulted to allowing all requests without authentication, so any reachable instance exposed its API to unauthenticated ca…KEVEPSS 100%analysed8.8CVE-2020-11978Apache Airflow example DAG command injectionApache Airflow 1.10.10 and below ship an example DAG containing an OS command injection flaw. Any authenticated user can execute arbitrary commands a…KEVEPSS 99%analysed9.8CVE-2026-33264Apache airflow deserialization of untrusted data vulnerabilityA bug in `BaseSerialization.deserialize()` allowed unrestricted `import_string()` of attacker-controlled class paths when the Scheduler / API Server …EPSS 1.6%9.8CVE-2023-25754Apache airflow vulnerabilityPrivilege Context Switching Error vulnerability in Apache Software Foundation Apache Airflow.This issue affects Apache Airflow: before 2.6.0.EPSS 2.3%9.8CVE-2023-22884Apache airflow command injection vulnerabilityImproper Neutralization of Special Elements used in a Command ('Command Injection') vulnerability in Apache Software Foundation Apache Airflow, Apach…EPSS 11%9.8CVE-2022-40189Apache airflow os command injection vulnerabilityImproper Neutralization of Special Elements used in an OS Command ('OS Command Injection') vulnerability in Apache Airflow Pig Provider, Apache Airfl…EPSS 4.1%9.8CVE-2022-38649Apache airflow os command injection vulnerabilityImproper Neutralization of Special Elements used in an OS Command ('OS Command Injection') vulnerability in Apache Airflow Pinot Provider, Apache Air…EPSS 3.3%9.8CVE-2022-38054Apache airflow vulnerabilityIn Apache Airflow versions 2.2.4 through 2.3.3, the `database` webserver session backend was susceptible to session fixation.EPSS 2.1%

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.