Cyber Resilience

CVE-2022-40127

RCE in Apache Airflow ≤ 2.4.0

High EPSSRCE
Published
14 November 2022
Modified
30 April 2025
Patch / advisory
CVSS Score v3.1 8.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.86 99.7th percentile
Risk Priority 87 floored blend · peak EPSS

Summary

CVE-2022-40127 is a high-severity Code Injection (CWE-94) vulnerability in Apache Airflow. Its CVSS base score is 8.8 (High).

Operationally, ranked in the top 0.3% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) and SI-2 (Flaw Remediation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

A vulnerability in the Example Dags component of Apache Airflow permits command injection through the manually supplied run_id parameter when DAGs are triggered. The flaw, tracked as CWE-94, affects all versions prior to 2.4.0 and carries a CVSS 3.1 base score of 8.8.

An authenticated user who already possesses UI access and the ability to trigger DAGs can supply a crafted run_id value to execute arbitrary commands on the underlying system, achieving full confidentiality, integrity, and availability impact within the Airflow deployment.

Advisories and the associated pull request 25960 indicate that the issue is resolved by upgrading to Apache Airflow 2.4.0 or later.

The EPSS score has remained consistently high, reaching a peak of 0.9385 with a current value of 0.9331.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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.

CWE(s)

Related Threats

Likely ATT&CK TechniquesAI

Techniques this vulnerability likely enables, inferred from its description, weakness type, and attributed-actor tradecraft. Confidence is per-technique.

T1059 Command and Scripting Interpreter Executionconfidence: HIGH
The vulnerability allows an authenticated user to inject and execute arbitrary commands via the run_id parameter.
T1068 Exploitation for Privilege Escalation Privilege Escalationconfidence: HIGH
Command injection through a crafted run_id enables privilege escalation within the Airflow deployment.
T1190 Exploit Public-Facing Application Initial Accessconfidence: HIGH
The flaw permits exploitation of a public-facing Airflow UI component to achieve remote command execution.
inferred from description + CWE · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2025-54550Same product: Apache Airflow
CVE-2024-56373Same product: Apache Airflow
CVE-2024-39877Same product: Apache Airflow
CVE-2023-22888Same product: Apache Airflow
CVE-2023-40273Same product: Apache Airflow
CVE-2023-42781Same product: Apache Airflow
CVE-2023-22887Same product: Apache Airflow
CVE-2023-42780Same product: Apache Airflow
CVE-2023-42792Same product: Apache Airflow
CVE-2023-46288Same product: Apache Airflow

Affected Assets

apache
airflow
≤ 2.4.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
  • SI-10 Information Input Validation
  • SI-2 Flaw Remediation
  • AC-6 Least Privilege
Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

prevent

Directly requires validation and sanitization of the run_id input parameter to block the CWE-94 command injection.

prevent

Mandates prompt application of the vendor fix (upgrade to Airflow 2.4.0+) that eliminates the vulnerable Example Dags code path.

prevent

Limits which authenticated users are granted the DAG-trigger permission required to reach the vulnerable run_id parameter.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly target injection flaws via secure coding and testing (mostly), yet as a single broad outcome it leaves many code-generation specifics unaddressed (partial).

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

prevents

Banning unapproved code samples and unauthenticated web services, combined with secure-coding standards and SAST, prevents the dynamic generation or inclusion of attacker-supplied code.

none

Controls that restrict unauthorized or malicious code from being introduced via external networks or removable media limit opportunities for an attacker to inject and execute arbitrary code.

References