9.8 CVE-2021-41773

Enriched by CISA CISA Kev Catalog Path Traversal Patch Exploit
  

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 directories configured by Alias-like directives. If files outside of these directories are not protected by the usual default configuration "require all denied", these requests can succeed. If CGI scripts are also enabled for these aliased pathes, this could allow for remote code execution. This issue is known to be exploited in the wild. This issue only affects Apache 2.4.49 and not earlier versions. The fix in Apache HTTP Server 2.4.50 was found to be incomplete, see CVE-2021-42013.
https://nvd.nist.gov/vuln/detail/CVE-2021-41773

Categories

CWE-22 : Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. "Path traversal" is preferred over "directory traversal," but both terms are attack-focused. an alternate phrasing of "path traversal" Automated techniques can find areas where path traversal weaknesses exist. However, tuning or customization may be required to remove or de-prioritize path-traversal problems that are only exploitable by the product's administrator - or other privileged users - and thus potentially valid behavior or, at worst, a bug instead of a vulnerability. Manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all file access operations can be assessed within limited time constraints. For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server. Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481]. Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations. When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues. Large language model (LLM) management tool does notvalidate the format of a digest value (CWE-1287) from aprivate, untrusted model registry, enabling relativepath traversal (CWE-23), a.k.a. Probllama Chain: API for text generation using Large Language Models (LLMs) doesnot include the "\" Windows folder separator in its denylist (CWE-184)when attempting to prevent Local File Inclusion via path traversal(CWE-22), allowing deletion of arbitrary files on Windows systems. Product for managing datasets for AI model training and evaluation allows both relative (CWE-23) and absolute (CWE-36) path traversal to overwrite files via the Content-Disposition header Chain: a learning management tool debugger uses external input to locate previous session logs (CWE-73) and does not properly validate the given path (CWE-20), allowing for filesystem path traversal using "../" sequences (CWE-24) Python package manager does not correctly restrict the filename specified in a Content-Disposition header, allowing arbitrary file read using path traversal sequences such as "../" Python package constructs filenames using an unsafe os.path.join call on untrusted input, allowing absolute path traversal because os.path.join resets the pathname to an absolute path that is specified as part of the input. directory traversal in Go-based Kubernetes operator app allows accessing data from the controller's pod file system via ../ sequences in a yaml file Chain: Cloud computing virtualization platform does not require authentication for upload of a tar format file (CWE-306), then uses .. path traversal sequences (CWE-23) in the file to access unexpected files, as exploited in the wild per CISA KEV. a Kubernetes package manager written in Go allows malicious plugins to inject path traversal sequences into a plugin archive ("Zip slip") to copy a file outside the intended directory Chain: security product has improper input validation (CWE-20) leading to directory traversal (CWE-22), as exploited in the wild per CISA KEV. Go-based archive library allows extraction of files to locations outside of the target folder with "../" path traversal sequences in filenames in a zip file, aka "Zip Slip" Newsletter module allows reading arbitrary files using "../" sequences. Chain: PHP app uses extract for register_globals compatibility layer (CWE-621), enabling path traversal (CWE-22) FTP server allows deletion of arbitrary files using ".." in the DELE command. FTP server allows creation of arbitrary directories using ".." in the MKD command. FTP service for a Bluetooth device allows listing of directories, and creation or reading of files using ".." sequences. Software package maintenance program allows overwriting arbitrary files using "../" sequences. Bulletin board allows attackers to determine the existence of files using the avatar. PHP program allows arbitrary code execution using ".." in filenames that are fed to the include() function. Overwrite of files using a .. in a Torrent file. Chat program allows overwriting files using a custom smiley request. Chain: external control of values for user's desired language and theme enables path traversal. Chain: library file sends a redirect if it is directly requested but continues to execute, allowing remote file inclusion and path traversal.

References

134c704f-9b21-4f2e-91b3-4a467353bcc0 Exploit

af854a3a-2127-422b-91ae-364da2661108 Patch Exploit

http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Tr...
Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Tr...
Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/164629/Apache-2.4.49-2.4.50-Traversal-Re...
Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/164941/Apache-HTTP-Server-2.4.50-Remote-...
Exploit Third Party Advisory VDB Entry
http://www.openwall.com/lists/oss-security/2021/10/05/2
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/07/1
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/07/6
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/1
Exploit Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/2
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/3
Exploit Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/4
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/5
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/6
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/09/1
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/11/4
Mailing List Patch Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/15/3
Mailing List Patch Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/16/1
Mailing List Third Party Advisory
https://httpd.apache.org/security/vulnerabilities_24.html
Release Notes Vendor Advisory
https://lists.apache.org/thread.html/r17a4c6ce9aff662efd9459e9d1850ab4a611cb2...
Mailing List Patch
https://lists.apache.org/thread.html/r6abf5f2ba6f1aa8b1030f95367aaf17660c4e4c...
Mailing List
https://lists.apache.org/thread.html/r7c795cd45a3384d4d27e57618a215b0ed19cb6c...
Mailing List
https://lists.apache.org/thread.html/r98d704ed4377ed889d40479db79ed1ee2f43b2e...
Mailing List
https://lists.apache.org/thread.html/rb5b0e46f179f60b0c70204656bc52fcb558e961...
Mailing List
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
Release Notes
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
Release Notes
https://security.gentoo.org/glsa/202208-20
Third Party Advisory
https://security.netapp.com/advisory/ntap-20211029-0009/
Third Party Advisory
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-s...
Third Party Advisory
https://www.oracle.com/security-alerts/cpujan2022.html
Patch Third Party Advisory

security@apache.org Patch Exploit

http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Tr...
Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Tr...
Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/164629/Apache-2.4.49-2.4.50-Traversal-Re...
Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/164941/Apache-HTTP-Server-2.4.50-Remote-...
Exploit Third Party Advisory VDB Entry
http://www.openwall.com/lists/oss-security/2021/10/05/2
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/07/1
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/07/6
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/1
Exploit Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/2
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/3
Exploit Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/4
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/5
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/08/6
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/09/1
Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/11/4
Mailing List Patch Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/15/3
Mailing List Patch Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/10/16/1
Mailing List Third Party Advisory
https://httpd.apache.org/security/vulnerabilities_24.html
Release Notes Vendor Advisory
https://lists.apache.org/thread.html/r17a4c6ce9aff662efd9459e9d1850ab4a611cb2...
Mailing List Patch
https://lists.apache.org/thread.html/r6abf5f2ba6f1aa8b1030f95367aaf17660c4e4c...
Mailing List
https://lists.apache.org/thread.html/r7c795cd45a3384d4d27e57618a215b0ed19cb6c...
Mailing List
https://lists.apache.org/thread.html/r98d704ed4377ed889d40479db79ed1ee2f43b2e...
Mailing List
https://lists.apache.org/thread.html/rb5b0e46f179f60b0c70204656bc52fcb558e961...
Mailing List
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
Release Notes
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
Release Notes
https://security.gentoo.org/glsa/202208-20
Third Party Advisory
https://security.netapp.com/advisory/ntap-20211029-0009/
Third Party Advisory
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-s...
Third Party Advisory
https://www.oracle.com/security-alerts/cpujan2022.html
Patch Third Party Advisory


 

AFFECTED (from MITRE)


Vendor Product Versions
Apache Software Foundation Apache HTTP Server
  • Apache HTTP Server 2.4 2.4.49 [affected]
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.

CPE

cpe start end
Configuration 1
cpe:2.3:a:apache:http_server:2.4.49:*:*:*:*:*:*:*
Configuration 2
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
Configuration 3
cpe:2.3:a:oracle:instantis_enterprisetrack:17.1:*:*:*:*:*:*:*
cpe:2.3:a:oracle:instantis_enterprisetrack:17.2:*:*:*:*:*:*:*
cpe:2.3:a:oracle:instantis_enterprisetrack:17.3:*:*:*:*:*:*:*
Configuration 4
cpe:2.3:a:netapp:cloud_backup:-:*:*:*:*:*:*:*


REMEDIATION


Patch

Url
http://www.openwall.com/lists/oss-security/2021/10/11/4
http://www.openwall.com/lists/oss-security/2021/10/15/3
https://lists.apache.org/thread.html/r17a4c6ce9aff662efd9459e9d1850ab4a611cb2...
https://www.oracle.com/security-alerts/cpujan2022.html
http://www.openwall.com/lists/oss-security/2021/10/11/4
http://www.openwall.com/lists/oss-security/2021/10/15/3
https://lists.apache.org/thread.html/r17a4c6ce9aff662efd9459e9d1850ab4a611cb2...
https://www.oracle.com/security-alerts/cpujan2022.html


EXPLOITS


Exploit-db.com

id description date
50383 Apache HTTP Server 2.4.49 - Path Traversal & Remote Code Execution (RCE) 2021-10-06

POC Github

Url
https://github.com/ZephrFish/CVE-2021-41773-PoC
https://github.com/iilegacyyii/PoC-CVE-2021-41773
https://github.com/TishcaTpx/POC-CVE-2021-41773
https://github.com/lorddemon/CVE-2021-41773-PoC
https://github.com/Ls4ss/CVE-2021-41773_CVE-2021-42013
https://github.com/habibiefaried/CVE-2021-41773-PoC
https://github.com/creadpag/CVE-2021-41773-POC
https://github.com/r00tVen0m/CVE-2021-41773
https://github.com/AssassinUKG/CVE-2021-41773
https://github.com/Hattan515/POC-CVE-2021-41773
https://github.com/justakazh/mass_cve-2021-41773
https://github.com/shellreaper/CVE-2021-41773
https://github.com/superzerosec/CVE-2021-41773
https://github.com/5gstudent/cve-2021-41773-and-cve-2021-42013
https://github.com/theLSA/apache-httpd-path-traversal-checker
https://github.com/walnutsecurity/cve-2021-41773
https://github.com/TheLastVvV/CVE-2021-41773
https://github.com/MazX0p/CVE-2021-41773
https://github.com/kubota/POC-CVE-2021-41773
https://github.com/i6c/MASS_CVE-2021-41773
https://github.com/the29a/CVE-2021-41773
https://github.com/puckiestyle/CVE-2021-41773
https://github.com/CalfCrusher/Path-traversal-RCE-Apache-2.4.49-2.4.50-Exploit
https://github.com/iosifache/ApacheRCEEssay
https://github.com/mightysai1997/CVE-2021-41773-PoC
https://github.com/aqiao-jashell/py-CVE-2021-41773
https://github.com/blackn0te/Apache-HTTP-Server-2.4.49-2.4.50-Path-Traversal-...
https://github.com/0xGabe/Apache-CVEs
https://github.com/mah4nzfr/CVE-2021-41773
https://github.com/gunzf0x/CVE-2021-41773
https://github.com/adrianmafandy/CVE-2021-41773
https://github.com/ISabbiI/PoC-Apache-CVE-2021-41773-Infrastructure-LAB
https://github.com/Areeba-Zehra-Jafri/CVE-2021-41773---Apache-Path-Traversal-...
https://github.com/sobanahmed6061/CVE-2021-41773-RedTeam
https://github.com/abds059/APACHE-PATH-TRAVERSAL-RCE-CVE-2021-41773-
https://github.com/im2nerd/CVE-2021-41773

Other Nist (github, ...)

Url
http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Tr...
http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Tr...
http://packetstormsecurity.com/files/164629/Apache-2.4.49-2.4.50-Traversal-Re...
http://packetstormsecurity.com/files/164941/Apache-HTTP-Server-2.4.50-Remote-...
http://www.openwall.com/lists/oss-security/2021/10/08/1
http://www.openwall.com/lists/oss-security/2021/10/08/3
http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Tr...
http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Tr...
http://packetstormsecurity.com/files/164629/Apache-2.4.49-2.4.50-Traversal-Re...
http://packetstormsecurity.com/files/164941/Apache-HTTP-Server-2.4.50-Remote-...
http://www.openwall.com/lists/oss-security/2021/10/08/1
http://www.openwall.com/lists/oss-security/2021/10/08/3


CAPEC


Common Attack Pattern Enumerations and Classifications

id description severity
126 Path Traversal
Very High
64 Using Slashes and URL Encoding Combined to Bypass Validation Logic
High
76 Manipulating Web Input to File System Calls
Very High
78 Using Escaped Slashes in Alternate Encoding
High
79 Using Slashes in Alternate Encoding
High