CVE-2021-26690

7.5 HIGH

📋 TL;DR

CVE-2021-26690 is a NULL pointer dereference vulnerability in Apache HTTP Server's mod_session module that can be triggered by a specially crafted Cookie header. This causes the server to crash, resulting in a denial of service. All Apache HTTP Server installations using mod_session with versions 2.4.0 through 2.4.46 are affected.

💻 Affected Systems

Products:
  • Apache HTTP Server
Versions: 2.4.0 to 2.4.46 inclusive
Operating Systems: All operating systems running affected Apache versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if mod_session is enabled and configured. Many default installations do not enable mod_session.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Repeated exploitation could cause sustained service outages, making web applications completely unavailable to legitimate users.

🟠

Likely Case

Intermittent server crashes requiring manual restart, causing temporary service disruption and potential data loss for in-flight requests.

🟢

If Mitigated

With proper monitoring and automated restart mechanisms, impact is limited to brief service interruptions during attack windows.

🌐 Internet-Facing: HIGH - Apache HTTP Server is commonly internet-facing, and the exploit requires only HTTP access with no authentication.
🏢 Internal Only: MEDIUM - Internal attackers could still exploit this, but the attack surface is smaller than internet-facing deployments.

🎯 Exploit Status

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

Exploitation is straightforward - sending a malformed Cookie header to a vulnerable endpoint. Public proof-of-concept code exists in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Apache HTTP Server 2.4.47 and later

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

Restart Required: Yes

Instructions:

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

🔧 Temporary Workarounds

Disable mod_session

all

Remove or comment out mod_session module loading if session functionality is not required

# In httpd.conf or apache2.conf, comment out: # LoadModule session_module modules/mod_session.so
# Also remove any Session* directives from configuration

Use mod_security to filter malicious cookies

all

Implement Web Application Firewall rules to block malformed Cookie headers

# Example mod_security rule: SecRule REQUEST_HEADERS:Cookie "@rx \x00" "id:1001,phase:1,deny,status:400,msg:'NULL byte in Cookie header'"
# Add to mod_security configuration file

🧯 If You Can't Patch

  • Implement network-level filtering to block requests with malformed Cookie headers at load balancer or WAF
  • Deploy monitoring with automated restart scripts to minimize downtime during attacks

🔍 How to Verify

Check if Vulnerable:

Check Apache configuration for 'LoadModule session_module' and verify Apache version is between 2.4.0 and 2.4.46

Check Version:

httpd -v (or apache2 -v on some systems)

Verify Fix Applied:

Verify Apache version is 2.4.47 or later and test with known exploit payloads to confirm no crash occurs

📡 Detection & Monitoring

Log Indicators:

  • Apache crash logs with segmentation fault errors
  • Repeated Apache service restarts in system logs
  • Error logs containing 'mod_session' related crashes

Network Indicators:

  • HTTP requests with malformed Cookie headers containing NULL bytes
  • Sudden drops in legitimate traffic followed by service restarts

SIEM Query:

source="apache_access" AND (Cookie="*\x00*" OR Cookie="*%00*") OR source="apache_error" AND message="*segmentation fault*" AND message="*mod_session*"

🔗 References

📤 Share & Export