CVE DatabaseCVE-2021-41773
한국어 권고문 →
CVE-2021-417739.8/CRITICALCISA KEVCWE-22CWE-22

Apache HTTP Server 2.4.49 Path Traversal and Remote Code Execution Vulnerability (CVE-2021-41773) Security Advisory

⚡ Jump to Patch
Affected Vendors
apache
Affected Components
http_server
Published Date
2021-10-05
CVSS v3.1
9.8
CRITICAL
EPSS (30d)
100.0%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Apache HTTP Server version 2.4.49.

Impact

Attackers can exploit this vulnerability using specially crafted URLs to access sensitive files outside the document root or execute arbitrary commands (RCE) if CGI scripts are enabled.

Mitigation

Immediately upgrade to the latest stable version (2.4.51 or higher) and enforce strict directory access controls ('Require all denied').

Affected Products & Version Scope

This issue specifically affects Apache HTTP Server version 2.4.49. Note that the fix introduced in version 2.4.50 was incomplete (tracked as CVE-2021-42013), making both 2.4.49 and 2.4.50 vulnerable in practice.

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Immediately upgrade Apache HTTP Server to version 2.4.51 or later to fully resolve the vulnerability.

bash
# For Debian/Ubuntu-based systems
sudo apt-get update
sudo apt-get install --only-upgrade apache2 -y

# For RedHat/CentOS-based systems
sudo yum update httpd -y

# Verify the installed version
apache2 -v || httpd -v

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, modify the 'httpd.conf' configuration file to restrict directory access and disable vulnerable modules.

nginx
# 1. Explicitly deny access to the root directory
<Directory />
    AllowOverride none
    Require all denied
</Directory>

# 2. Disable mod_cgi if it is not strictly required
# LoadModule cgi_module modules/mod_cgi.so

# 3. Test configuration and restart the service
sudo apachectl configtest
sudo systemctl restart apache2 || sudo systemctl restart httpd

3. Log Audit & IoC Verification Commands

Scan your web server access logs to identify potential path traversal attempts and RCE exploitation patterns.

bash
# Search for encoded path traversal patterns (.%2e) in access logs
grep -E '\.%2e|%2e%2e' /var/log/apache2/access.log /var/log/httpd/access_log

# Detect potential command execution attempts via cgi-bin
grep -i 'cgi-bin' /var/log/apache2/access.log | grep -E 'sh|bash|cmd'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
Organizations running Apache HTTP Server 2.4.49 or 2.4.50 must upgrade to version 2.4.51 or higher immediately and enforce strict access control policies.

Block Exploits Instantly with Managed Virtual Patching Rules

Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

A critical flaw was introduced in Apache HTTP Server 2.4.49 due to a change made to the path normalization logic. Attackers can bypass standard path traversal protections by utilizing URL-encoded characters such as '%2e%2e' to represent dot-dot ('..') sequences. Because the server fails to properly normalize and validate these encoded paths, it allows requests to map to files outside the directories configured by Alias-like directives, leading to a Path Traversal vulnerability (CWE-22).

2. Exploitation Mechanics & Attack Scenario

An attacker sends a crafted HTTP GET or POST request containing encoded traversal sequences, such as '/cgi-bin/.%2e/.%2e/.%2e/.%2e/etc/passwd'.

  • Arbitrary File Read: If the default configuration does not explicitly protect directories outside the document root with 'Require all denied', the request succeeds, allowing the attacker to read sensitive system files.
  • Remote Code Execution (RCE): If CGI scripts ('mod_cgi') are enabled for these aliased paths and a shell binary (like '/bin/sh') is accessible, the attacker can pipe commands through the HTTP request body to execute arbitrary code under the privileges of the web server daemon.

3. Infrastructure & Business Impact

This vulnerability has a CVSS score of 9.8 (Critical) and is actively exploited in the wild, as confirmed by its inclusion in the CISA KEV catalog. With an EPSS score of 0.9999, the likelihood of exploitation is extremely high. Successful exploitation can lead to full system compromise, unauthorized data exfiltration, lateral movement within the internal network, and severe disruption of business operations.

Official Vendor Advisories & References

NVD Original English Description

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.

Frequently Asked SecOps Questions (CVE-2021-41773)

FAQ

Q1. How critical is CVE-2021-41773 and is it actively exploited in the wild?

CVE-2021-41773 is rated CVSS 9.8 (CRITICAL) with a 30-day EPSS exploitation probability of 100.0%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2021-41773?

Primary impacted vendors include apache across http_server. Scope summary: This issue specifically affects Apache HTTP Server version 2.4.49. Note that the fix introduced in version 2.4.50 was incomplete (tracked as CVE-2021-42013), making both 2.4.49 and 2.4.50 vulnerable in practice.

Q3. What temporary mitigations or workarounds exist for CVE-2021-41773 before patching?

[Mitigation] Immediately upgrade to the latest stable version (2.4.51 or higher) and enforce strict directory access controls ('Require all denied'). Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2021-41773

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (apache)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2021-41773 Apache HTTP Server 2.4.49 Path Traversal and Remote Code Execution Vulnerability (CVE-2021-41773) Security Advisory (CVSS 9.8) - Patch & Workaround | CVE Pulse