Skip to content
Access control Disclosed report Intermediate CVE-2023-25754

Privilege Esacalation at Apache Airflow 2.5.1

Airflow 2.5.1 created its log files with world-writable permissions, so any local Linux user could read and modify them. An attacker with a local account and access to the Airflow web server could replace a log file with a symbolic link to a sensitive file such as an SSH private key, then read it through the web interface, escalating from their own account to the Airflow account.

Siung kim Follow

Originally disclosed on HackerOne

Bounty$2,400 Medium View original
  • Triaged in 24 hours
  • Fixed in 9 days
  • Paid in 9 days
  • Disclosed after 10 days

Summary by the program

CVE-2023-25754: Apache Airflow: Privilege escalation using airflow logs Severity: moderate

Affected versions:

  • Apache Airflow before 2.6.0

Description: Privilege Context Switching Error vulnerability in Apache Software Foundation Apache Airflow.This issue affects Apache Airflow: before 2.6.0.

Credit: ksw9722 (finder)

Full Security Advisory: https://lists.apache.org/thread/3y83gr0qb8t49ppfk4fb2yk7md8ltq4v

The report

Hello. I found security issue about airflow's log file.

Airflow 2.5.1 sets log files to vulnerable privileges. (chmod 666)

Any Linux user on the host on which the airflow operates can read and tamper with the airflow's logs.

Taking advantage of this, an attacker in local host can retrieve sensitive information from a Linux host that can only access airflow accounts. ** (This is privilege escaltion from any linux account to airflow's linux account) ** (ex : ssh private key)

** The attack conditions are as follows. **

  1. An attacker can log in to a host running airflow with a specific Linux account.

(Or the penetration test was successfully successful.)

  1. An attacker can log in to the airflow web server and can read the dag log.

** The attack procedure is as follows. **

  1. After deleting a specific dag log using any account, the attacker regenerates the log file using the ssh private key of the account that runs the airflow as a symbolic link.
image.png
image.png From the original on HackerOne
  1. The attacker logs in to the airflow webserver and reads the log.
image.png
image.png From the original on HackerOne
  1. The airflow logs expose SSH PRIVATE KEY.
image.png
image.png From the original on HackerOne

Patch History

Impact

Local linux user can access any file like ssh private key which owned by account which operate airflow.

Attachments

image.png
image.png From the original on HackerOne

The original report as published on HackerOne, by ksw9722. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the log files were created with world-readable and world-writable permissions (chmod 666) and the web log viewer followed symbolic links, so a local user could redirect a log path to any file the Airflow account could read.

Impact

A local Linux user could read any file owned by the account running Airflow, such as an SSH private key, escalating their privileges to that account.

What the attacker needed

Local Linux account on the Airflow host; access to the Airflow web server; ability to read DAG logs

The fix

The issue affects Apache Airflow before 2.6.0; the text does not describe the fix.

How it was found

  1. Log in to the host running Airflow with any local Linux account and confirm access to the Airflow web server and its DAG logs.
  2. Delete a specific DAG log file using that account.
  3. Recreate the log file as a symbolic link pointing to the SSH private key of the account that runs Airflow.
  4. Log in to the Airflow web server and open the log to read the exposed private key.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

On a shared computer, files have permissions that decide who can read or change them. Airflow made its log files readable and writable by every user on the machine, and it also let people view those logs through its website. By swapping a log file for a shortcut (a symbolic link) pointing at a secret file, an attacker could make the website show that secret, gaining access meant only for the Airflow user.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Siung kim

View all

1 more disclosed report, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.