SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |    Help    |   

SecurityTracker
Archives


Welcome to SecurityTracker!
 
Click to Sign Up
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com

Sign Up!





Category:  Application (Forum/Board/Portal)  >  phpBB Vendors:  phpBB Group
phpBB Flaw in 'viewtopic.php' Highlighting Code May Let Remote Users Execute Arbitrary Commands
SecurityTracker Alert ID:  1014320
SecurityTracker URL:  http://securitytracker.com/id?1014320
CVE Reference:  GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Jun 28 2005
Impact:  Execution of arbitrary code via network, User access via network
Version(s): 2.0.15
Description:  A vulnerability was reported in phpBB in the highlighting code in 'viewtopic.php'. A remote user may be able to execute arbitrary commands on the target system.

The script does not properly use the preg_replace() function on a user-supplied string, which may cause the string to be interepreted as PHP code.

The underlying flaw is based on an older vulnerability in versions prior to 2.0.11 that was not properly corrected.

The vendor was notified on June 23, 2005.

Ron van Daal reported this vulnerability.

Impact:  A remote user may be able to execute arbitrary commands on the target system with the privileges of the target web service.
Solution:  The vendor has released a fixed version (2.0.16), available at:

http://www.phpbb.com/downloads.php

Vendor URL:  www.phpbb.com/ (Links to External Site)
Cause:  Input validation error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)
Reported By:  ronvdaal <ronvdaal@zarathustra.linux666.com>
Message History:   None.


 Source Message Contents

Date:  Tue, 28 Jun 2005 23:03:22 +0200 (CEST)
From:  ronvdaal <ronvdaal@zarathustra.linux666.com>
Subject:  Security Advisory - phpBB 2.0.15 PHP-code injection bug

 


Security Advisory -//- phpBB 2.0.15 PHP-code injection bug

Program: phpBB 2.0.15 and older versions
Homepage: http://www.phpbb.com
Risk: Very High
Date: June 28 2005
Title: PHP-code injection bug
Type: partial disclosure
Author: Ron van Daal :.
Vendor notified: June 23 2005

Background:

phpBB is a high powered, fully scalable, and highly customizable
Open Source bulletin board package. Based on the PHP server language
and supporting a variety of backend database servers.


Description:

Due to a bug in the phpBB highlighting code it's possible to inject
PHP-code into the running script. E.g. It's possible to run system
commands if the PHP interpreter allows system() and simular functions.
This is actually based on an old bug which was improperly fixed in
phpBB 2.0.11.


Technical:

The highlighting code uses the preg_replace() function on line 1110
in viewtopic.php. It uses the special modifier "e" which causes PHP
to evaluate the replacement string as PHP code. Below is a PHP code
example of what actually happens:

<?
$string1="phpinfo()";
$string2=preg_replace('//e',$string1,'');
?>

This causes PHP to execute the phpinfo() function. Usage of the
preg_replace special modifier "e" should be avoided if possible.


Proof of concept:

Sorry, partial disclosure advisory.


Solution:

Upgrade to phpBB version 2.0.16 or edit viewtopic.php on line #1110:

Change this: str_replace('\\', '\\\\', $highlight_match)

Into this:   str_replace('\\', '\\\\', addslashes($highlight_match))


Credits:

Synto(nix) && Doqnach @Umbranet #unixtalk

<EOF>


--
Theo de Raadt: "BSD guys are a lot like Linux guys, except they have kissed girls"
Methinks: "FreeBSD guys are a lot like OpenBSD guys, except they have fscked girls"

 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us   |    Help

Copyright 2005, SecurityGlobal.net LLC