Vulnerability record · CVE-2021-42013 · published 7 October 2021
CVE-2021-42013: Apache HTTP Server path traversal and RCE via incomplete fix
Apache · Http Server
The fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient, leaving a path traversal flaw that lets attackers map URLs to files outside directories configured by Alias-like directives. When those files are not protected by the default "require all denied" configuration, requests succeed, and if CGI scripts are enabled on the aliased paths, this escalates to remote code execution. Only Apache 2.4.49 and 2.4.50 are affected.
Description
It was found that the fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient. 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 only affects Apache 2.4.49 and Apache 2.4.50 and not earlier versions.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityCVSS 9.8, active exploitation in CISA KEV with ransomware use, near-maximum EPSS, and public exploit code make this an urgent patch-first issue.
What it is
The fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient, leaving a path traversal flaw that lets attackers map URLs to files outside directories configured by Alias-like directives. When those files are not protected by the default "require all denied" configuration, requests succeed, and if CGI scripts are enabled on the aliased paths, this escalates to remote code execution. Only Apache 2.4.49 and 2.4.50 are affected.
Impact
An unauthenticated attacker can read files outside the intended web root and, where CGI is enabled on aliased paths, execute arbitrary code on the server. This yields full compromise of confidentiality, integrity and availability.
Attack surface
Reachable over the network via crafted HTTP requests to the web server; no authentication and no user interaction are required per the CVSS vector (AV:N/AC:L/PR:N/UI:N). Exploitation depends on server configuration: aliased paths lacking "require all denied" and, for RCE, CGI enabled on those paths.
Exploitation
CISA KEV lists it as actively exploited with known ransomware campaign use, and EPSS is near maximum (0.99964, 99.976th percentile). Multiple public exploit references are tagged Exploit, confirming weaponized code is available.
What to do
- Upgrade Apache HTTP Server to 2.4.51 or later, which contains the complete fix.
- If immediate upgrade is not possible, ensure all Alias-like directories are protected with "require all denied" and disable CGI execution on aliased paths.
- Apply vendor patches for downstream products (Fedora, Oracle, NetApp) that bundle the affected httpd versions.
- Audit httpd configuration for aliased paths and CGI handlers that could expose files outside the web root.
- Restrict network exposure of affected Apache instances until patched.
Detection
- Inspect web server access logs for path traversal patterns such as encoded dot-dot sequences (e.g. %2e%2e, .%2e/, %%32%65) in request URIs.
- Alert on requests to aliased paths that resolve outside the document root or that target /cgi-bin/ with traversal sequences.
- Monitor for unexpected outbound connections or child processes spawned by the httpd user, which may indicate RCE.
- Correlate httpd logs with file access to sensitive paths such as /etc/passwd or configuration files.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Exploitation in the wild
CISA added CVE-2021-42013 to the Known Exploited Vulnerabilities catalog on 3 November 2021 as "Apache HTTP Server Path Traversal Vulnerability". CISA reports known use in ransomware campaigns. Required action: Apply updates per vendor instructions. Federal deadline 17 November 2021.
Affected products
6 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2021-42013 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2021-42013), CISA KEV, FIRST EPSS (scores of 2026-09-16). This page is refreshed as NVD updates the record.