CVE-2026-40861 Apache Airflow: Arbitrary File Read via Log Symlink following in FileTaskHandler

Medium 6.5 Published Updated

A Dag author can read or overwrite arbitrary files via symlink or path traversal in log handling if worker and API server share log volumes.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40861?

CVE-2026-40861 is a medium-severity path traversal vulnerability in Apache Airflow, published on 1 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A Dag author could either (a) create a symlink under their task's log directory pointing to an arbitrary file readable by the API server process (read-path attack — e.g. `/etc/passwd` or `airflow.cfg`) or (b) supply a `task_id` containing `..` sequences accepted by the Task SDK's `KEY_REGEX` (write-path attack), and in both cases the FileTaskHandler resolves the log path outside the configured `base_log_folder`, leaking or overwriting arbitrary files. Only affects deployments where the worker log folder is shared with the API server. Users are advised to upgrade to `apache-airflow` 3.2.2 or later. As a defense-in-depth mitigation, deploy the worker and API server with separate log volumes so that worker-controlled paths cannot reach the API server's filesystem.

Weakness: CWE-59

Which versions are affected by CVE-2026-40861?

4 open source packages ship an affected version, including apache-airflow and airflow. It affects 1 product.

PackageAffectedFixed in
apache-airflow PyPIAll versions3.2.2
apache-airflow PyPIAll versions3.2.2
apache-airflow PyPIAll versions3.2.2
airflow BitnamiAll versions3.2.2

Products include Apache Airflow.

How do I fix CVE-2026-40861?

Upgrade apache-airflow to 3.2.2 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-40861 being exploited?

There is no known exploitation of CVE-2026-40861 in the wild and no public exploit code.

All Apache Airflow vulnerabilities

Sources

Also known as BIT-airflow-2026-40861, ECHO-765c-0c1b-39b8, GHSA-89cj-xrpx-j79m, MINI-488p-56v5-m2cv, MINI-7xhx-h3r2-jrch, PYSEC-2026-181.

Is CVE-2026-40861 in your software?

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

Check your SBOMs for free