CVE-2025-54941 Apache Airflow: Command injection in "example_dag_decorator"

Medium 4.6 Published Updated

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.

PackageAffectedFixed in
apache-airflow PyPIFrom 3.0.03.0.5
apache-airflow PyPIFrom 3.0.03.0.5
apache-airflow PyPIFrom 3.0.03.0.5
airflow BitnamiFrom 3.0.03.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.

All Apache Airflow vulnerabilities

Sources

Also known as BIT-airflow-2025-54941, GHSA-v3c9-j6h9-66v4, PYSEC-2026-1135.

Is CVE-2025-54941 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free