CVE-2026-40861 Apache Airflow: Arbitrary File Read via Log Symlink following in FileTaskHandler
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.
| Package | Affected | Fixed in |
|---|---|---|
apache-airflow PyPI | All versions | 3.2.2 |
apache-airflow PyPI | All versions | 3.2.2 |
apache-airflow PyPI | All versions | 3.2.2 |
airflow Bitnami | All versions | 3.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.
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-2026-40861, ECHO-765c-0c1b-39b8, GHSA-89cj-xrpx-j79m, MINI-488p-56v5-m2cv, MINI-7xhx-h3r2-jrch, PYSEC-2026-181.