bugtraq
[Top] [All Lists]

Re: PHP Event Calendar 1.5.1 (index.php) Remote File Include Vulnerabili

To: bugtraq@securityfocus.com
Subject: Re: PHP Event Calendar 1.5.1 (index.php) Remote File Include Vulnerability
From: Stuart Moore <smoore.bugtraq@securityglobal.net>
Date: Wed, 29 Nov 2006 16:43:01 -0500
Delivered-to: sp-com-lists@consult.net
Delivered-to: bugtraq-list@securepoint.com
Delivered-to: mailing list bugtraq@securityfocus.com
Delivered-to: moderator for bugtraq@securityfocus.com
List-help: <mailto:bugtraq-help@securityfocus.com>
List-id: <bugtraq.list-id.securityfocus.com>
List-post: <mailto:bugtraq@securityfocus.com>
List-subscribe: <mailto:bugtraq-subscribe@securityfocus.com>
List-unsubscribe: <mailto:bugtraq-unsubscribe@securityfocus.com>
Mailing-list: contact bugtraq-help@securityfocus.com; run by ezmlm
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)
Systems that install 1.5.1 (fresh install rather than upgrade) should not be vulnerable.

"philip anselmo" wrote:

Vulnerable Code:
***************
include $path_to_calendar."calendar.php";


Looking at the few lines prior to that:

  extract($HTTP_GET_VARS);
  if(!@include './data/global.php'){
          echo "Can't open ./data/global.php";
          exit;
  }

  extract($PATHS);
  include $path_to_calendar."calendar.php";


After successfully running 'install.php', the 'data/global.php' file
will contain something like this:

  $PATHS=array(
  "path_to_calendar" => "/[blah]/cl_files/",
  "path_to_calendar_img" => "/[blah]/cl_files/img/",
  "WEB_path_to_calendar_img" => "http://[site]/[blah]/cl_files/img/";,
  "path_to_data" => "/[blah]/cl_files/data/"
  );


The include statement will use "/[blah]/cl_files/" instead of the user-supplied parameter in $HTTP_GET_VARS.

And, indeed, testing confirms that the static parameter is used and that
the reported exploit URL does not work.

Systems that have been upgraded from an earlier version in an improper
manner may be a different story.

Stuart




<Prev in Thread] Current Thread [Next in Thread>