vendor:
Apache HTTP Server
by:
Ash Daulton & cPanel Security Team
9.8
CVSS
CRITICAL
Remote Code Execution (RCE)
78
CWE
Product Name: Apache HTTP Server
Affected Version From: Apache 2.4.50
Affected Version To: Apache 2.4.50
Patch Exists: YES
Related CWE: CVE-2021-42013
CPE: a:apache:http_server:2.4.50
Metasploit:
https://www.rapid7.com/db/vulnerabilities/oracle-solaris-cve-2021-41773/, https://www.rapid7.com/db/vulnerabilities/oracle-solaris-cve-2021-42013/, https://www.rapid7.com/db/vulnerabilities/amazon-linux-ami-2-cve-2021-42013/, https://www.rapid7.com/db/vulnerabilities/amazon-linux-ami-2-cve-2021-41773/, https://www.rapid7.com/db/vulnerabilities/gentoo-linux-cve-2021-42013/, https://www.rapid7.com/db/vulnerabilities/apache-httpd-cve-2021-42013/, https://www.rapid7.com/db/vulnerabilities/amazon_linux-cve-2021-42013/, https://www.rapid7.com/db/vulnerabilities/freebsd-cve-2021-42013/, https://www.rapid7.com/db/vulnerabilities/gentoo-linux-cve-2021-41773/, https://www.rapid7.com/db/vulnerabilities/freebsd-cve-2021-41773/, https://www.rapid7.com/db/vulnerabilities/amazon_linux-cve-2021-41773/, https://www.rapid7.com/db/modules/auxiliary/scanner/http/apache_normalize_path/, https://www.rapid7.com/db/modules/exploit/multi/http/apache_normalize_path_rce/
Platforms Tested: Debian 5.10.28
2021
Exploit: Apache HTTP Server 2.4.50 – Remote Code Execution (RCE) (2)
This exploit is a bash script that can be used to gain a reverse shell on Apache 2.4.50 with CGI enabled. The script takes three parameters: the URL of the target, the local host IP address, and the local port. It then sends two curl requests to the target, the first of which creates a shell script in the /tmp directory, and the second of which executes the shell script.
Mitigation:
Disable CGI on Apache 2.4.50, or upgrade to a newer version of Apache.