The vulnerability is a missing authorization check in the Human-in-the-Loop (HITL) endpoints of Apache Airflow's Execution API. The provided patch, commit 479c68edc536dd3b2866e03699c058151af14112, addresses this by modifying airflow-core/src/airflow/api_fastapi/execution_api/routes/hitl.py.
The vulnerable code initialized a FastAPI router without any authorization checks: router = APIRouter(). The patch adds a crucial authorization dependency: router = APIRouter(dependencies=[JWTBearerTIPathDep]). This new dependency, JWTBearerTIPathDep, validates that the calling task instance is authorized to access the requested HITL resource.
This router is responsible for handling all HITL API endpoints. By inspecting the file, two primary functions are identified as being vulnerable:
get_hitl_detail: This function handles GET requests to read HITL workflow details. Without the authorization check, any authenticated task could read the details of any other task's HITL workflow.
update_hitl_detail: This function handles PUT requests to approve or reject a HITL workflow. The lack of authorization allowed any authenticated task to change the state of another task's HITL workflow.
Exploitation of this vulnerability would involve an authenticated but unauthorized task instance making API calls to these endpoints. Therefore, get_hitl_detail and update_hitl_detail are the key functions that would appear in a runtime profile during such an attack.