Home    |    View Topics    |    Search    |    Contact Us    |   



Category:   Application (Forum/Board/Portal)  >   contentNow Vendors:
contentNow Input Validation Flaw in 'pageid' Parameter Lets Remote Users Inject SQL Commands
SecurityTracker Alert ID:  1017265
SecurityTracker URL:
CVE Reference:   CVE-2006-6157   (Links to External Site)
Updated:  May 27 2008
Original Entry Date:  Nov 21 2006
Impact:   Disclosure of system information, Disclosure of user information, User access via network
Fix Available:  Yes  Vendor Confirmed:  Yes  Exploit Included:  Yes  
Version(s): 139 and prior versions
Description:   A vulnerability was reported in contentNow. A remote user can inject SQL commands.

The 'index.php' script does not properly validate user-supplied input in the 'pageid' parameter. A remote user can supply a specially crafted parameter value to execute SQL commands on the underlying database.

A remote user can also exploit this to determine the installation path.

A demonstration exploit is available at:

The vendor was notified on November 20, 2006.

Revenge reported this vulnerability.

Impact:   A remote user can execute SQL commands on the underlying database.
Solution:   The vendor has issued a fixed version (140 and later), available at:

The contentNow advisory is available at:

Vendor URL: (Links to External Site)
Cause:   Input validation error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)

Message History:   None.

 Source Message Contents

Subject:  ContentNow CMS 1.39 Sql Injection + Path Disclosure Vulnerabilities

Hash: SHA1

ContentNow CMS 1.39 'pageid' Sql Injection + Path Disclosure

Severity : Medium Risk
Vendor   :
Author	 : Revenge


[#] Description

ContentNow is a PHP Content Management System web 2.0 compliant, more
info can be found at vendor site.

ContentNow v1.39 is vulnerable to a sql injection and path disclosure.


Vuln #1  : Sql Injection
Impact   : Admin credentials disclosure
Exploit  :
(Works regardless of magic quotes)

The "pageid" parameter in "index.php" isn't properly sanitised before
being used in a sql query, this can be exploited to manipulate existing
SQL query by inserting arbitrary SQL code, which can disclose sensitive
information like admin credentials.

The problem is due to:
[ index.php ]
// get/set id or startpageid from config
  -->   $pid = $_GET['pageid'];
        if (empty($pid) || $pid == 1) $pid =

  -->   if (false == $cnEngine->checkPid($pid)) die ('<span
style="font:13px sans-serif;">Error loading site. No pid found.</span>');


[ function checkPid($pid) and getActualContent($param) from
/cn/library/class.engine.php ]
function checkPid($pid) {
                $cnDatabase = NewADOConnection(ADODB_DB_TYPE);
                $cnDatabase->Connect(CN_DB_HOST, CN_DB_USER,
                $sql = "SELECT pageid FROM ".CN_TBL_SECTIONS." WHERE
pageid = ".$pid;
                $res = $cnDatabase->Execute($sql);
                if ($res->RecordCount() > 0) {
                        return true;
                } else {
                        return false;

function getActualContent($param = '') {
                $cnDatabase = NewADOConnection(ADODB_DB_TYPE);
                $cnDatabase->Connect(CN_DB_HOST, CN_DB_USER,
                $sql = "SELECT ".TABLE_FIELDS_CONTENT." FROM
".CN_TBL_CONTENT.$this->contentLanguageSuffix." WHERE pid =
".$this->pageid." AND deleted = 0 ".$param." ORDER by sort ASC";
                $res = $cnDatabase->Execute($sql);
                if ($res->RecordCount() > 0) {
                        while ($row = $res->FetchRow()) {
                                $row['contenttitle'] =
                                $row['contentsyskey'] =
                                $row['contentsubtitle'] =
                                $row['content'] =
                                $contentArray[] = $row;
                $this->contentArray = $contentArray;
                return $contentArray;

As you can see there's no input validation on "pageid" parameter.

Vuln #2: It is also possible to disclose the full path to index.php by
requesting index.php?pageid='


[#] Solution

Download 1.40 version.

[#] Disclosure timeline

2006/11/20 Bug discovered
2006/11/20 Vendor contacted
2006/11/21 Vendor response
2006/11/21 New version 1.40 released
2006/11/21 Public Disclosure


Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla -



Go to the Top of This SecurityTracker Archive Page

Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2021, LLC