CVE-2026-40861: Apache Airflow: Arbitrary File Read via Log Symlink following in FileTaskHandler
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 taskid containing .. sequences accepted by the Task SDK's KEYREGEX (write-path attack), and in both cases the FileTaskHandler resolves the log path outside the configured baselogfolder, 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
apache-airflowto a version that resolves this vulnerability.Fixed in 3.2.2 - Compensating control
Deploy the Apache Airflow worker and API server with separate log volumes so worker-controlled paths cannot reach the API server filesystem (defense-in-depth mitigation for CVE-2026-40861; mitigation applies only where worker log folder is shared with the API server).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-40861?
The severity of CVE-2026-40861 is medium with a score of 6.5 based on the CVSS 3.1 metrics.
How do I fix CVE-2026-40861?
CVE-2026-40861 can be fixed by applying the available patch from the Apache Airflow repository.
What type of vulnerability is CVE-2026-40861?
CVE-2026-40861 is an arbitrary file read vulnerability that can be exploited through log symlink manipulation.
Who is affected by CVE-2026-40861?
Users running affected versions of Apache Airflow with specific configurations are vulnerable to CVE-2026-40861.
What can an attacker do with CVE-2026-40861?
An attacker can exploit CVE-2026-40861 to read arbitrary files on the server, such as sensitive configuration files.