CVE-2021-41773: Apache HTTP Server Path Traversal Vulnerability
Apache · HTTP Server · NVD published 2021-10-05 · posted 2026-10-21 · last modified 2026-06-17
What it is
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.
| Weakness | CWE-22 |
|---|---|
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (source: [email protected]) |
| CISA due date | 2021-11-17 (for US federal agencies under BOD; a good deadline for everyone) |
| ATT&CK tactics | Execution → Lateral Movement |
Exploitation evidence
First exploit evidence seen: 2021-05-10 (earliest date across the sources below).
Exploited in the wild
- CISA KEV: listed since 2021-11-03. Source
Public exploit code
Metasploit
auxiliary/scanner/http/apache_normalize_path: Apache 2.4.49/2.4.50 Traversal RCE scanner (disclosure 2021-05-10)exploit/multi/http/apache_normalize_path_rce: Apache 2.4.49/2.4.50 Traversal RCE (disclosure 2021-05-10)
Exploit-DB
- EDB-50383: Apache HTTP Server 2.4.49 - Path Traversal & Remote Code Execution (RCE) (2021-10-06, verified)
- EDB-50512: Apache HTTP Server 2.4.50 - Remote Code Execution (RCE) (3) (2021-11-11, verified)
GitHub proof-of-concept repositories
175 public repositories from 164 accounts, first seen 2021-10-05. Most starred: blasty/CVE-2021-41773 (211 stars), view repository.
Verify before running: public PoCs can be malicious. Read the code and only run it in an isolated lab. A PoC means exploit code is public, not that this CVE is exploited in the wild.
Sources: CISA KEV · Rapid7 Metasploit Framework module metadata · Exploit-DB (OffSec) · nomi-sec/PoC-in-GitHub.
Defend the Chain
The attack chain for CVE-2021-41773 laid across the MITRE ATT&CK Enterprise tactics. Solid cards come from the MITRE CTID KEV mappings; dashed cards are inferred by CVERadar from the CWE or description. Correct defences are real ATT&CK mitigations for that technique.
Pick a red technique card on the board, then choose the defence that stops it.
Defend against T1059 Command and Scripting Interpreter CTID: primary impact
CVE-2021-41773 is a path traversal vulnerability in Apache HTTP Server 2.4.49 that allows an attacker 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 paths, this could allow for remote code execution.
How to fix it
CISA required action
Apply updates per vendor instructions. (source: CISA KEV)
Fixed versions
NVD does not list a fixed version for this CVE. Use the vendor advisory below.
Derived from the NVD CPE configuration (versionEndExcluding / versionEndIncluding). Always confirm with the vendor advisory.
Vendor advisories and patches
- 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)
- https://httpd.apache.org/security/vulnerabilities_24.html (Release Notes, Vendor Advisory)
- https://lists.apache.org/thread.html/r17a4c6ce9aff662efd9459e9d1850ab4a611cb23392fc68264c72cb3%40%3Ccvs.httpd.apache.org%3E (Mailing List, Patch)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RMIIEFINL6FUIOPD2A3M5XC6DH45Y3CC/ (Release Notes)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WS5RVHOIIRECG65ZBTZY7IEJVWQSQPG3/ (Release Notes)
- https://www.oracle.com/security-alerts/cpujan2022.html (Patch, Third Party Advisory)
MITRE ATT&CK mitigations for this chain
- M1033 Limit Software Installation (for T1059) : Prevent user installation of unrequired command and scripting interpreters.
- M1045 Code Signing (for T1059) : Where possible, only permit execution of signed scripts.
- M1042 Disable or Remove Feature or Program (for T1059, T1210) : Disable or remove any unnecessary or unused shells or interpreters.
- M1038 Execution Prevention (for T1059) : Use application control where appropriate. For example, PowerShell Constrained Language mode can be used to restrict access to sensitive or otherwise dangerous language elements such as those used to execute arbitrary Windows APIs or files (e.g., `Add-Type`).
- M1049 Antivirus/Antimalware (for T1059) : Anti-virus can be used to automatically quarantine suspicious files.
- M1026 Privileged Account Management (for T1059, T1210) : When PowerShell is necessary, consider restricting PowerShell execution policy to administrators. Be aware that there are methods of bypassing the PowerShell execution policy, depending on environment configuration. PowerShell JEA (Just Enough Administration) may also be used to sandbox administration and limit what c
- M1047 Audit (for T1059) : Inventory systems for unauthorized command and scripting interpreter installations.
- M1021 Restrict Web-Based Content (for T1059) : Script blocking extensions can help prevent the execution of scripts and HTA files that may commonly be used during the exploitation process. For malicious code served up through ads, adblockers can help prevent that code from executing in the first place.
- M1040 Behavior Prevention on Endpoint (for T1059) : On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent [Visual Basic](https://attack.mitre.org/techniques/T1059/005) and [JavaScript](https://attack.mitre.org/techniques/T1059/007) scripts from executing potentially malicious downloaded content .
- M1016 Vulnerability Scanning (for T1210) : Regularly scan the internal network for available services to identify new and potentially vulnerable services.
Detection Generic guidance
- Execution: Watch for the service process spawning shells or script interpreters (cmd.exe, powershell, sh, bash, python) via EDR process-tree rules.
- Lateral Movement: Watch for the compromised host authenticating to other internal systems it does not normally talk to.
Response checklist Generic guidance
- Inventory: find every instance of the affected product and version (include internet-facing and forgotten ones).
- Patch or mitigate per the vendor advisory; if you cannot patch, remove internet exposure or apply the vendor workaround.
- Assume compromise if the system was exposed before patching: hunt for the indicators in the advisory and review logs back to the disclosure date.
- Rotate credentials and secrets stored on or used by the affected system if compromise cannot be ruled out.
Sources
- NVD: CVE-2021-41773
- CVE.org record
- CISA Known Exploited Vulnerabilities catalog
- FIRST EPSS (2026-10-24)
- MITRE CTID Mappings Explorer: KEV → ATT&CK
- http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Traversal-Remote-Code-Execution.html (Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/164418/Apache-HTTP-Server-2.4.49-Path-Traversal.html (Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/164629/Apache-2.4.49-2.4.50-Traversal-Remote-Code-Execution.html (Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/164941/Apache-HTTP-Server-2.4.50-Remote-Code-Execution.html (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/16/1 (Mailing List, Third Party Advisory)
- https://lists.apache.org/thread.html/r6abf5f2ba6f1aa8b1030f95367aaf17660c4e4c78cb2338aee18982f%40%3Cusers.httpd.apache.org%3E (Mailing List)
- https://lists.apache.org/thread.html/r7c795cd45a3384d4d27e57618a215b0ed19cb6ca8eb070061ad5d837%40%3Cannounce.apache.org%3E (Mailing List)
- https://lists.apache.org/thread.html/r98d704ed4377ed889d40479db79ed1ee2f43b2ebdd79ce84b042df45%40%3Cannounce.apache.org%3E (Mailing List)
- https://lists.apache.org/thread.html/rb5b0e46f179f60b0c70204656bc52fcb558e961cb4d06a971e9e3efb%40%3Cusers.httpd.apache.org%3E (Mailing List)
- 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-sa-apache-httpd-pathtrv-LAzg68cZ (Third Party Advisory)
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-41773 (US Government Resource)