What is Apache HTTP Server?
Apache HTTP Server is one of the oldest and most widely deployed web servers in the world, powering a significant fraction of internet-accessible websites and internal applications. Version 2.4.49 introduced a change to URL normalization that inadvertently created a path traversal vulnerability — and mass exploitation began within hours of public disclosure.
Overview
CVE-2021-41773 is a critical path traversal vulnerability (CWE-22) introduced in Apache HTTP Server 2.4.49. A change to the URL path normalization code in 2.4.49 broke existing path traversal protections, allowing an unauthenticated attacker to use percent-encoded path sequences (e.g., %2e%2e) to traverse outside the web server's document root and read arbitrary files. If CGI scripts are enabled, the path traversal can be used for remote code execution. Apache released 2.4.50 on the same day as the CVE, but that fix was incomplete — see CVE-2021-42013 for the bypass. Apache 2.4.51 fully resolves both issues.
Affected Versions
| Version | Status |
|---|---|
| Apache 2.4.48 and earlier | Not affected by this CVE |
| Apache 2.4.49 | Vulnerable |
| Apache 2.4.50 | Partially fixed (still vulnerable to CVE-2021-42013) |
| Apache 2.4.51 | Fully fixed |
Technical Details
Apache 2.4.49 introduced a code change to the URL path normalization routine. The change inadvertently allowed percent-encoded dot sequences to bypass directory traversal protections:
- Vulnerable pattern:
GET /cgi-bin/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd HTTP/1.1 - Path traversal: The percent-encoded
..sequences traverse outside the web root to any file readable by the Apache process - RCE condition: If
mod_cgiormod_cgidis enabled, the attacker can traverse to a CGI-executable path and execute arbitrary commands — or use an explicitPOSTto inject shell commands via CGI - No authentication required: The path traversal is reachable pre-authentication
- Mass exploitation: Publicly released PoC exploits drove immediate internet-wide scanning starting October 5, 2021 — within hours of CVE publication
Discovery
Discovered by Ash Daulton and the cPanel Security Team during auditing of Apache 2.4.49's changes. The same day as the CVE (October 4-5, 2021), Apache released 2.4.50 with a fix — but the fix proved incomplete, leading to CVE-2021-42013 three days later.
Exploitation Context
CVE-2021-41773 was one of the most rapidly exploited vulnerabilities of 2021. Within 24 hours of the public PoC, internet-wide scanning for Apache 2.4.49 was occurring at scale. Attackers deployed webshells, cryptocurrency miners, and in some cases ransomware on vulnerable servers. The vulnerability only affected the single Apache 2.4.49 release — organizations that upgraded directly to 2.4.51 bypassed both this CVE and CVE-2021-42013.
Remediation
- Upgrade to Apache HTTP Server 2.4.51 or later — this fixes both CVE-2021-41773 and CVE-2021-42013
- Check current Apache version:
apache2 -vorhttpd -v - If CGI is not required, disable
mod_cgiandmod_cgidas defense-in-depth - Ensure
Require all deniedis set for directories not served by Apache - Review Apache access logs for
%2e%2eor%%32%65path patterns indicating traversal attempts - If running Apache 2.4.49 or 2.4.50, treat the server as potentially compromised — check for unexpected files in CGI directories and document root
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2021-41773 |
| Vendor / Product | Apache — HTTP Server |
| NVD Published | 2021-10-05 |
| NVD Last Modified | 2026-02-17 |
| CVSS 3.1 Score | 9.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Severity | CRITICAL |
| CWE | CWE-22 find similar ↗ |
| CISA KEV Added | 2021-11-03 |
| CISA KEV Deadline | 2021-11-17 |
| Known Ransomware Use | ⚠️ Yes |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2021-10-04 | Apache HTTP Server 2.4.49 released with path traversal vulnerability; Apache 2.4.50 released same day with fix |
| 2021-10-05 | CVE published; mass exploitation begins |
| 2021-10-07 | Apache 2.4.50 fix found incomplete (CVE-2021-42013); Apache 2.4.51 released |
| 2021-11-03 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2021-11-17 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| Apache HTTP Server 2.4 Security Vulnerabilities | Vendor Advisory |
| NVD — CVE-2021-41773 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |