CVE-2011-2767

9.8 CRITICAL

📋 TL;DR

This vulnerability in mod_perl allows attackers to execute arbitrary Perl code by placing it in a user-controlled .htaccess file. It affects Apache HTTP Server installations using mod_perl 2.0 through 2.0.10. The flaw enables unprivileged users to run code with the same permissions as the Apache process.

💻 Affected Systems

Products:
  • mod_perl
  • Apache HTTP Server with mod_perl
Versions: 2.0 through 2.0.10
Operating Systems: Linux, Unix, Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations where mod_perl is enabled and .htaccess files are processed. Shared hosting environments are particularly vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise allowing arbitrary code execution, data theft, privilege escalation, and complete system control.

🟠

Likely Case

Remote code execution leading to web application compromise, data exfiltration, and lateral movement within the network.

🟢

If Mitigated

Limited impact if proper file permissions prevent .htaccess uploads or mod_perl is disabled.

🌐 Internet-Facing: HIGH - Web servers are typically internet-facing and .htaccess files can be uploaded via web applications.
🏢 Internal Only: MEDIUM - Internal web servers could still be exploited by authenticated users or through other attack vectors.

🎯 Exploit Status

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

Exploitation requires ability to upload or modify .htaccess files, which typically requires some level of access to the web server.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: mod_perl 2.0.11 and later

Vendor Advisory: https://access.redhat.com/errata/RHSA-2018:2737

Restart Required: Yes

Instructions:

1. Update mod_perl to version 2.0.11 or later. 2. For Red Hat systems: yum update mod_perl. 3. Restart Apache service: systemctl restart httpd or service httpd restart.

🔧 Temporary Workarounds

Disable .htaccess processing

all

Prevent Apache from processing .htaccess files in vulnerable directories

<Directory /path/to/webroot>
AllowOverride None
</Directory>

Disable mod_perl

linux

Remove or disable mod_perl module if not required

a2dismod perl
systemctl restart apache2

🧯 If You Can't Patch

  • Restrict file upload permissions to prevent .htaccess file creation
  • Implement strict file system monitoring for .htaccess modifications

🔍 How to Verify

Check if Vulnerable:

Check mod_perl version: perl -Mmod_perl2 -e 'print $mod_perl2::VERSION'

Check Version:

perl -Mmod_perl2 -e 'print $mod_perl2::VERSION'

Verify Fix Applied:

Verify mod_perl version is 2.0.11 or higher using the same command

📡 Detection & Monitoring

Log Indicators:

  • Unexpected .htaccess file modifications
  • Suspicious Perl code execution in Apache logs
  • Unauthorized file upload attempts

Network Indicators:

  • Unusual outbound connections from web server
  • Suspicious HTTP requests containing Perl code

SIEM Query:

source="apache_access.log" AND ("PUT" OR "POST") AND ".htaccess"

🔗 References

📤 Share & Export