# Privilege Esacalation at Apache Airflow 2.5.1 

Airflow 2.5.1 created log files world-writable (chmod 666), letting any local Linux user replace a DAG log with a symlink to the airflow user's SSH private key and read it via the web UI.

- Payout: $2,400
- Severity: medium
- Program: Internet Bug Bounty
- Found by: ksw9722
- Disclosed: 2023-05-18
- CVE: CVE-2023-25754
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/1872682
- Library page: https://bugbountylibrary.com/r/h1%3A1872682
- Tags: area:cloud domain:infra impact:data-leak impact:internal-access impact:privesc kind:bounty platform:hackerone sev:medium technique:chained vuln:misconfiguration vuln:privilege-escalation

**Target:** Apache Airflow log file handling / DAG log viewer
**Root cause:** Airflow set log file permissions to 666 (world read/write), so any local user could delete and recreate a log path as a symlink to a file owned by the airflow account.
**Steps:**
1. As any local Linux user, delete an existing DAG log file under the airflow log directory.
2. Create a symlink at that log path pointing to the airflow user's sensitive file, e.g. `ln -s /home/airflow/.ssh/id_rsa <dag_log_path>`.
3. Trigger log regeneration so Airflow writes/opens the path following the symlink.
4. Log in to the Airflow webserver and open the DAG log to read the symlinked file contents (SSH private key).
**How found:** Noticed Airflow 2.5.1 sets log files to chmod 666, making them world-writable; hypothesized that deleting and symlinking a log path would let the airflow process follow the link and expose files it owns.
**Exploitation:** Attacker with a local Linux account deletes a DAG log, replaces it with a symlink to the airflow user's SSH private key, then reads the log through the Airflow web UI to exfiltrate the key, escalating from any local account to the airflow account.
**Escalation:** Chained local file access with the web log viewer to pivot from an unprivileged Linux account to the airflow service account's credentials.
**Insight:** World-writable log files are a symlink-attack primitive: if a privileged process writes to a path any user can delete/recreate, replace it with a symlink to a file the process can read, then retrieve it via any log-viewing UI.

