CVE-2024-39877: Apache Airflow Arbitrary Code Execution Vulnerability

apache-airflow Updated 02 Oct 2025

Summary

17/07/2024
Yes i
High
8.8

CVE-2024-39877: Apache Airflow 2.4.0, and versions before 2.9.3, has a vulnerability that allows authenticated DAG authors to craft a doc_md parameter in a way that could execute arbitrary code in the scheduler context, which should be... Affects apache-airflow versions >= 2.4.0, < 2.9.3. Fixed in 2.9.3. How to fix ↓

Also tracked for

The same CVE-2024-39877 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache Airflow is an open-source platform designed to programmatically author, schedule, and monitor workflows. It allows users to define workflows as Directed Acyclic Graphs (DAGs) and provides a rich user interface to manage and visualize these workflows. However, certain versions of Apache Airflow, specifically from 2.4.0 to 2.9.2, are vulnerable to a security flaw that can potentially allow authenticated users to execute arbitrary code within the scheduler context, violating the intended security model.

Vulnerability Detail

The vulnerability arises from the ability of authenticated DAG authors to manipulate the 'doc_md' parameter in a way that could lead to the execution of arbitrary code. This is particularly concerning as it undermines the security model of Apache Airflow, which is designed to prevent unauthorized code execution. If exploited, this vulnerability could allow an attacker to execute malicious code on the scheduler, leading to unauthorized access to sensitive data or disruption of service.

How To Fix

Latest published version: 3.3.2 as of 22 Oct 2026

pip install --upgrade "apache-airflow==3.3.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.9.3

This is the first release that contains the fix.

pip install --upgrade "apache-airflow==2.9.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, users can restrict access to the Airflow UI and limit the permissions of DAG authors until they can upgrade to a patched version. This can be done by modifying the role-based access control settings in Airflow to prevent unauthorized users from creating or modifying DAGs.

Conclusion

In summary, the CVE-2024-39877 vulnerability in Apache Airflow poses a significant risk by allowing authenticated users to execute arbitrary code. Users are strongly advised to upgrade to version 2.9.3 or later to mitigate this risk. Additionally, temporary workarounds can be implemented to limit exposure until an upgrade can be performed.

See every vulnerability recorded for apache-airflow →

Share this vulnerability

FAQ

Apache Airflow versions 2.4.0 to 2.9.2 are affected by this vulnerability.

The CVSS score of this vulnerability is 8.8, indicating a high severity level.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

If you cannot upgrade immediately, consider restricting access to the Airflow UI and limiting permissions for DAG authors as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for apache-airflow.

How To Fix

Latest published version: 3.3.2 as of 22 Oct 2026

pip install --upgrade "apache-airflow==3.3.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.9.3

This is the first release that contains the fix.

pip install --upgrade "apache-airflow==2.9.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback