CVE-2025-54941 Apache Airflow: Command injection in "example_dag_decorator"
Attackers can execute arbitrary code on Airflow workers via a malicious parameter in an example DAG, requiring example DAGs to be enabled.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-54941?
CVE-2025-54941 is a medium-severity command injection vulnerability in Apache Airflow, published on 30 Oct 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
An example dag `example_dag_decorator` had non-validated parameter that allowed the UI user to redirect the example to a malicious server and execute code on worker. This however required that the example dags are enabled in production (not default) or the example dag code copied to build your own similar dag. If you used the `example_dag_decorator` please review it and apply the changes implemented in Airflow 3.0.5 accordingly.
Weakness: CWE-78
Which versions are affected by CVE-2025-54941?
4 open source packages ship an affected version, including apache-airflow and airflow. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
apache-airflow PyPI | From 3.0.0 | 3.0.5 |
apache-airflow PyPI | From 3.0.0 | 3.0.5 |
apache-airflow PyPI | From 3.0.0 | 3.0.5 |
airflow Bitnami | From 3.0.0 | 3.0.5 |
Products include Apache Airflow.
How do I fix CVE-2025-54941?
Upgrade apache-airflow to 3.0.5 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2025-54941 being exploited?
There is no known exploitation of CVE-2025-54941 in the wild and no public exploit code.
Other vulnerabilities in Apache Airflow
- CVE-2020-13927 Apache Airflow's Experimental API Authentication Bypass
- CVE-2020-11978 Apache Airflow Command Injection
- CVE-2026-33264 Apache Airflow: DAG author RCE on webserver via unrestricted import_string() in BaseSerialization.deserialize()
- CVE-2023-25754 Apache Airflow: Privilege escalation using airflow logs
- CVE-2023-22884 Apache Airflow, Apache Airflow MySQL Provider: Arbitrary file read via MySQL provider in Apache Airflow
Sources
Also known as BIT-airflow-2025-54941, GHSA-v3c9-j6h9-66v4, PYSEC-2026-1135.