Lucene search

K
hackeroneLeixiaoH1:1776476
HistoryNov 17, 2022 - 12:43 a.m.

Internet Bug Bounty: CVE-2022-40127: RCE in Apache Airflow <2.4.0 bash example

2022-11-1700:43:30
leixiao
hackerone.com
$4000
103
internet bug bounty
cve-2022-40127
remote code execution
apache airflow
command injection
dags
security vulnerability
os command execution
bug bounty

EPSS

0.4

Percentile

97.3%

airflow-2.3.3/airflow/example_dags/example_bash_operator.py has a command injection vulnerability.
I can control the run_id in the following code(example_bash_operator.py),So I can inject custom commands.

    also_run_this = BashOperator(
        task_id='also_run_this',
        bash_command='echo "run_id={{ run_id }} | dag_run={{ dag_run }}"',
    )

Enter the DAGs menu and start example_bash_operator task, select β€œTrigger DAG w/ config”.Set the run_id to " touch /tmp/success " and trigger.

{F2036322}

Impact

Execute any OS command