Path traversal in Apache HTTP Server - CVE-2021-41773

 

Path traversal in Apache HTTP Server - CVE-2021-41773

Published: October 5, 2021 / Updated: May 7, 2023


Vulnerability identifier: #VU57063
CSH Severity: Critical
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-41773
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: The vulnerability is being exploited in the wild

Vulnerability details

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing directory traversal sequences. A remote attacker can send a specially crafted HTTP request 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.

The vulnerability can be used to execute arbitrary OS commands on the system.

Note, the vulnerability is being actively exploited in the wild.


Affected software

Apache HTTP Server
Amazon Linux AMI
Gentoo Linux
Arch Linux
Slackware Linux
Fedora
httpd
apache
app-admin/apache-tools
www-servers/apache

How to mitigate CVE-2021-41773

Install update from vendor's website.

Apache HTTP Server - update to 2.4.50
httpd - addressed in versions 2.4.50-1.fc33, 2.4.50-1.fc34, 2.4.50-1.fc35, 2.4.51-1.fc34, 2.4.51-2.fc35
apache - update to 2.4.51-1
app-admin/apache-tools - update to 2.4.54
www-servers/apache - update to 2.4.54

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins