CVE-2021-36160

7.5 HIGH

📋 TL;DR

CVE-2021-36160 is an out-of-bounds read vulnerability in Apache HTTP Server's mod_proxy_uwsgi module. A specially crafted URI path can cause the server to read beyond allocated memory boundaries, leading to a crash and denial of service. This affects Apache HTTP Server versions 2.4.30 through 2.4.48 when mod_proxy_uwsgi is enabled.

💻 Affected Systems

Products:
  • Apache HTTP Server
Versions: 2.4.30 to 2.4.48 (inclusive)
Operating Systems: All operating systems running affected Apache versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when mod_proxy_uwsgi module is enabled and configured. Default Apache installations typically do not have this module enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service for the Apache HTTP Server, potentially affecting all hosted websites and applications.

🟠

Likely Case

Service disruption through server crashes requiring manual restart, leading to availability issues.

🟢

If Mitigated

Minimal impact if mod_proxy_uwsgi is disabled or proper request filtering is implemented.

🌐 Internet-Facing: HIGH - Apache servers with mod_proxy_uwsgi enabled and exposed to the internet are directly vulnerable to unauthenticated DoS attacks.
🏢 Internal Only: MEDIUM - Internal attackers could still cause service disruption, but external threat actors are more likely to exploit.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending a specially crafted URI path to a vulnerable Apache server with mod_proxy_uwsgi enabled. The vulnerability is well-documented in public advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Apache HTTP Server 2.4.49

Vendor Advisory: http://httpd.apache.org/security/vulnerabilities_24.html

Restart Required: Yes

Instructions:

1. Download Apache HTTP Server 2.4.49 or later from the official Apache website. 2. Stop the Apache service. 3. Install the updated version. 4. Restart the Apache service. 5. Verify the version is 2.4.49 or higher.

🔧 Temporary Workarounds

Disable mod_proxy_uwsgi

all

Remove or comment out the mod_proxy_uwsgi module from Apache configuration

# Edit httpd.conf or appropriate config file
# Comment out: LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
# Or remove the line entirely
# Then restart Apache: systemctl restart httpd

Implement request filtering

all

Use mod_rewrite or WAF to filter suspicious URI paths

# Add to Apache configuration:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/[a-zA-Z0-9._~!$&'()*+,;=:@/-]*$
RewriteRule ^ - [F]

🧯 If You Can't Patch

  • Disable mod_proxy_uwsgi module if not required for functionality
  • Implement network segmentation to limit access to vulnerable servers
  • Deploy a web application firewall (WAF) with DoS protection rules
  • Monitor server logs for unusual URI patterns and implement rate limiting

🔍 How to Verify

Check if Vulnerable:

Check Apache version and mod_proxy_uwsgi status: httpd -v and check configuration files for LoadModule proxy_uwsgi_module

Check Version:

httpd -v

Verify Fix Applied:

Verify Apache version is 2.4.49 or higher: httpd -v | grep 'Apache/2\.4\.'

📡 Detection & Monitoring

Log Indicators:

  • Apache process crashes
  • Segmentation fault errors in error_log
  • Unusual URI patterns with special characters
  • Multiple connection resets

Network Indicators:

  • Unusual HTTP requests with malformed URI paths
  • Increased 5xx error responses
  • Sudden service unavailability

SIEM Query:

source="apache_error.log" AND ("segmentation fault" OR "core dumped" OR "SIGSEGV")

🔗 References

📤 Share & Export