Cloudanix VulnDB

CVE-2011-2767

Critical · 9.8

CVSS

9.8

EPSS

8.9%

Published

Aug 26, 2018

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A configuration problem in an older web-server extension lets any user who can add files to a website folder secretly run their own programs on the server, giving them the same control as the server administrator.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Trivial
Impact
Remote Code Execution
Component
Library
Class
RCE
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

mod_perl permits arbitrary Perl code execution in the Apache process context when untrusted users can write .htaccess files, because the only available configuration options that enable Perl handlers for request processing also grant the same capability to any user-controlled .htaccess.

Why it matters to the business

Attackers can obtain full control of the web server and any data or systems reachable from the account running Apache, leading to data theft, service disruption, or use of the server for further attacks; the vulnerability affects many long-lived Apache deployments still running mod_perl.

How an attack unfolds

An attacker who can write files into a directory processed by Apache places a .htaccess containing PerlRequire, PerlModule, or Perl*Handler directives that load and run attacker-supplied Perl code; the code executes with the privileges of the Apache worker process on every matching HTTP request.

How to fix it

Disable mod_perl or remove the ability for users to supply .htaccess files (AllowOverride None); migrate to a supported mod_perl release or alternative such as mod_perl-free Apache with FastCGI or PSGI deployments; apply vendor patches where available for the listed distributions.

How to confirm the fix worked

Review httpd.conf and all .htaccess files for Perl* directives; confirm that AllowOverride does not permit Options or FileInfo in any user-writable tree; test that attempts to load Perl handlers from .htaccess are rejected.

Typical attack path

  1. Identify a writable directory under an Apache DocumentRoot or user home directory served by mod_perl
  2. Upload a malicious .htaccess file containing Perl code via FTP, WebDAV, or another upload mechanism
  3. Trigger the code by sending an HTTP request that matches the .htaccess location or handler
  4. Execute commands or exfiltrate data from the compromised Apache process context

How to detect it

Search web-server access and error logs for requests that reference directories containing .htaccess files with Perl* directives; inspect .htaccess contents across all hosted sites for PerlRequire, PerlModule, or Perl*Handler entries; monitor process execution for unexpected perl interpreters started by the Apache worker user.

  • PerlRequire
  • PerlModule
  • PerlResponseHandler
  • PerlTransHandler
  • .htaccess containing perl

What your security team should do

  • Inventory all systems running mod_perl and prioritize removal or upgrade
  • Enforce AllowOverride None or restrict .htaccess to administrator-controlled paths only
  • Replace mod_perl request handlers with non-Perl equivalents or containerized deployments

The record

mod_perl 2.0 through 2.0.10 allows attackers to execute arbitrary Perl code by placing it in a user-owned .htaccess file, because (contrary to the documentation) there is no configuration option that permits Perl code for the administrator's control of HTTP request processing without also permitting unprivileged users to run Perl code in the context of the user account that runs Apache HTTP Server processes.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 libapache2-mod-perl2 0 2.0.10-3
Debian:12 libapache2-mod-perl2 0 2.0.10-3
Debian:13 libapache2-mod-perl2 0 2.0.10-3
Debian:8 libapache2-mod-perl2 0 2.0.9~1624218-2+deb8u3
Mageia:6 apache-mod_perl 0 2.0.10-1.1.mga6
Red Hat:enterprise_linux:6::client mod_perl 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::client mod_perl-debuginfo 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::client mod_perl-devel 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::computenode mod_perl 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::computenode mod_perl-debuginfo 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::computenode mod_perl-devel 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::server mod_perl 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::server mod_perl-debuginfo 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::server mod_perl-devel 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::workstation mod_perl 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::workstation mod_perl-debuginfo 0 0:2.0.4-12.el6_10
Red Hat:enterprise_linux:6::workstation mod_perl-devel 0 0:2.0.4-12.el6_10
Red Hat:rhel_software_collections:3::el6 rh-perl524-mod_perl 0 0:2.0.9-10.el6
Red Hat:rhel_software_collections:3::el6 rh-perl524-mod_perl-debuginfo 0 0:2.0.9-10.el6
Red Hat:rhel_software_collections:3::el6 rh-perl524-mod_perl-devel 0 0:2.0.9-10.el6
Red Hat:rhel_software_collections:3::el7 rh-perl524-mod_perl 0 0:2.0.9-10.el7
Red Hat:rhel_software_collections:3::el7 rh-perl524-mod_perl-debuginfo 0 0:2.0.9-10.el7
Red Hat:rhel_software_collections:3::el7 rh-perl524-mod_perl-devel 0 0:2.0.9-10.el7
Red Hat:rhel_software_collections:3::el7 rh-perl526-mod_perl 0 0:2.0.10-10.el7
Red Hat:rhel_software_collections:3::el7 rh-perl526-mod_perl-debuginfo 0 0:2.0.10-10.el7
Red Hat:rhel_software_collections:3::el7 rh-perl526-mod_perl-devel 0 0:2.0.10-10.el7
SUSE:Linux Enterprise Point of Sale 11 SP3 apache2-mod_perl 0 2.0.4-40.63.3.3
SUSE:Linux Enterprise Server 11 SP4-LTSS apache2-mod_perl 0 2.0.4-40.63.3.3
SUSE:Linux Enterprise Server 12 SP4 apache2-mod_perl 0 2.0.8-13.5.1
SUSE:Linux Enterprise Server 12 SP5 apache2-mod_perl 0 2.0.8-13.5.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 apache2-mod_perl 0 2.0.8-13.5.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 apache2-mod_perl 0 2.0.8-13.5.1
SUSE:Linux Enterprise Software Development Kit 12 SP4 apache2-mod_perl 0 2.0.8-13.5.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 apache2-mod_perl 0 2.0.8-13.5.1
SUSE:Package Hub 15 apache2-mod_perl 0 2.0.11-bp151.4.3.1
SUSE:Package Hub 15 SP1 apache2-mod_perl 0 2.0.11-bp151.4.3.1
Ubuntu:14.04:LTS libapache2-mod-perl2 0 2.0.8+httpd24-r1449661-6ubuntu2.1
Ubuntu:16.04:LTS libapache2-mod-perl2 0 2.0.9-4ubuntu1.2
Ubuntu:18.04:LTS libapache2-mod-perl2 0 2.0.10-2ubuntu3.18.04.1
openSUSE:Leap 15.0 apache2-mod_perl 0 2.0.11-lp151.3.3.1
openSUSE:Leap 15.1 apache2-mod_perl 0 2.0.11-lp151.3.3.1
openSUSE:Tumbleweed apache2-mod_perl 0 2.0.11-2.12

Related vulnerabilities