Proof of concept to check if hosts are vulnerable to CVE-2021-41773.
A flaw was found in a change made to path normalization in Apache HTTP Server 2.4.49.
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.
This issue only affects Apache 2.4.49 and not earlier versions.
The only vulnerable version is Apache HTTP Server 2.4.49.
There are currently two methods:
- Update Apache HTTP Server to a version >= 2.4.50
- If the above is not possible, although not recommended as it doesn’t guarantee a fix, edit the following in
<!-- Vulnerable (Require all granted in '/') --> <Directory /> Options FollowSymLinks AllowOverride None Require all granted </Directory> <!-- Patched (Require all denied in '/') --> <Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory>
Use the script as follows:
CVE-2021-41773.py [-h] host Checks if an apache server is vulnerable to CVE-2021-41773. positional arguments: host ip/domain to be checked e.g. 'https://google.com/' optional arguments: -h, --help show this help message and exit