We should review the changes made to Boost to fix this problem and be sure this module isn't also affected.

------------SA-2007-022 - BOOST - FILE OVERWRITE------------

  * Advisory ID: DRUPAL-SA-2007-022.

  * Project: Boost (third-party module)

  * Version: 4.7.x-1.*, 5.x-0.*

  * Date: 2007-10-03

  * Security risk: Critical

  * Exploitable from: Remote

  * Vulnerability: Filesystem overwrite

------------DESCRIPTION------------

The Boost [ http://drupal.org//project/boost ] module provides a static
file-based cache of Drupal pages for anonymous users.  A vulnerability allows an
attacker to create or overwrite any filename in any directory that the web
server can write to.  The affected file will always contain the fully rendered
HTML for a single Drupal page; the attacker cannot control the content of the
affected file in any other way.

As an example, since most Drupal web servers have write access to the Drupal
installation directory, the attacker could replace Drupal's index.php with the
HTML of another page from the same site of his choosing, causing /every/ page
from the attacked site to appear like the chosen page.

------------VERSIONS AFFECTED------------

  * 5.x:

  * Boost before version 5.x-1.0

  * 4.7.x:

  * Boost before version 4.7.x-1.0

Drupal core is not affected. If you do not use the contributed Boost module,
there is nothing you need to do.

------------SOLUTION------------

Install the latest version:

  * 5.x:

  * Boost 5.x-1.0 [ http://drupal.org//node/179811 ]

  * 4.7.x:

  * Boost 4.7.x-1.0 [ http://drupal.org//node/179810 ]

------------REPORTED BY------------

Barry Jaspan [ http://drupal.org/user/46413 ] of the Drupal security team.

------------CONTACT------------

The security contact for Drupal can be reached at security at drupal.org or via
the form at [ http://drupal.org/contact ].

Comments

greggles’s picture

I don't think this is similar enough, though it's a good point. In boost the user specifies the filename that is created via the URL. It has to do this so that the htaccess rules can work. In fastpath_fscache the filename is based on the cache key with is an md5 or something right?

If someone can figure out how to get that cache key to be ../../../../index.php then this module would be in trouble.

jeremy’s picture

Status: Active » Closed (fixed)

Correct, this module uses the md5() function to generate a hash. And as md5() always returns a 32-bit hexadecimal value, it'll never return "../../../../index.php".