Debian Security Advisory

DSA-2452-1 apache2 -- insecure default configuration

Date Reported:
15 Apr 2012
Affected Packages:
Security database references:
In Mitre's CVE dictionary: CVE-2012-0216.
More information:

Niels Heinen noticed a security issue with the default Apache configuration on Debian if certain scripting modules like mod_php or mod_rivet are installed. The problem arises because the directory /usr/share/doc, which is mapped to the URL /doc, may contain example scripts that can be executed by requests to this URL. Although access to the URL /doc is restricted to connections from localhost, this still creates security issues in two specific configurations:

  • if some front-end server on the same host forwards connections to an apache2 backend server on the localhost address, or
  • if the machine running apache2 is also used for web browsing.

Systems not meeting one of these two conditions are not known to be vulnerable. The actual security impact depends on which packages (and accordingly which example scripts) are installed on the system. Possible issues include cross site scripting, code execution, or leakage of sensitive data.

This updates removes the problematic configuration sections from the files /etc/apache2/sites-available/default and .../default-ssl. When upgrading, you should not blindly allow dpkg to replace those files, though. Rather you should merge the changes, namely the removal of the Alias /doc "/usr/share/doc" line and the related <Directory "/usr/share/doc/"> block, into your versions of these config files. You may also want to check if you have copied these sections to any additional virtual host configurations.

For the stable distribution (squeeze), this problem has been fixed in version 2.2.16-6+squeeze7.

For the testing distribution (wheezy), this problem will be fixed in version 2.2.22-4.

For the unstable distribution (sid), this problem will be fixed in version 2.2.22-4.

For the experimental distribution, this problem has been fixed in version 2.4.1-3.

We recommend that you upgrade your apache2 packages and adjust your configuration.