CVE-2021-42013: Path Traversal and Remote Code Execution in Apache HTTP Server 2.4.49 and 2.4.50 (incomplete fix of CVE-2021-41773)
Apache HTTP Server contains a path traversal vulnerability that allows an attacker to perform remote code execution if files outside directories configured by Alias-like directives are not under default require all denied or if CGI scripts are enabled. This CVE ID resolves an incomplete patch for CVE-2021-41773.
Other sources
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Apache HTTP Serverto a version that resolves this vulnerability.Fixed in 2.4.50 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch CVE-2021-41773 - Configuration
Ensure that requests for files outside the directories configured by Alias-like directives are protected by the usual default configuration "require all denied" so those requests cannot succeed.
Apache HTTP Server require all denied (for files outside Alias-like directives) = enabled - Configuration
If CGI scripts are enabled for the aliased pathes (Alias-like directives), disable CGI execution for those aliased paths to prevent remote code execution.
Apache HTTP Server CGI scripts enabled for aliased paths = disabled - Compensating control
Apply additional hardening for Apache 2.4.49 and 2.4.50 where the CVE-2021-41773 fix was insufficient by ensuring the conditions enabling the attack are not present (i.e., files outside Alias-like directories are denied and CGI is not enabled for those aliased paths).
Event History
Frequently Asked Questions
What is the vulnerability ID?
The vulnerability ID is CVE-2021-42013.
What is the title of the vulnerability?
The title of the vulnerability is Apache HTTP Server Path Traversal Vulnerability.
What is the severity of CVE-2021-42013?
The severity of CVE-2021-42013 is critical with a CVSS score of 9.8.
How does CVE-2021-42013 affect Apache HTTP Server?
CVE-2021-42013 affects Apache HTTP Server versions 2.4.49 and 2.4.50.
How can I fix the Apache HTTP Server Path Traversal Vulnerability (CVE-2021-42013)?
To fix the vulnerability, update Apache HTTP Server to version 2.4.51 or apply the necessary patches provided by the vendor.