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

- Priority: **Routine**
- Reason: Not severe (CVSS 6.5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-06-01 · Modified: 2026-11-03
- Aliases: GHSA-89cj-xrpx-j79m, BIT-airflow-2026-40861, PYSEC-2026-181, CGA-5r33-8jvf-22vm, CGA-7q62-8c7w-7gq6, CGA-7qrc-qvrq-35r9, CGA-rhr8-76cf-2957
- Record: https://cvemate.com/vulnerability/CVE-2026-40861 · JSON: https://cvemate.com/vulnerability/CVE-2026-40861/json

## Description

```text
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.
```

## Signals

- CVSS: 6.5 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.691%, percentile 54.25%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- apache software foundation apache airflow: \< 3.0.0 \| ≥ 3.0.0, \< 3.2.2
- apache airflow: \< 3.2.2
- chainguard airflow-2 (Chainguard): All versions (No fix recorded)
- chainguard airflow-core-2 (Chainguard): All versions (No fix recorded)
- PyPI apache-airflow (PyPI): \< 3.2.2

## References

- <https://github.com/apache/airflow/pull/65325>
- <https://lists.apache.org/thread/823334db2559xjlwt59gpzjz47thnscl>
- <http://www.openwall.com/lists/oss-security/2026/05/31/1>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40861>
- <https://github.com/apache/airflow>
- <https://github.com/pypa/advisory-database/tree/main/vulns/apache-airflow/PYSEC-2026-181.yaml>
- <https://github.com/advisories/GHSA-89cj-xrpx-j79m>
- <https://pypi.python.org>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40861.json>

---

Data as of 2026-12-05T07:37:41.427Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
