what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

contentnow_139_sqlinjection.txt

contentnow_139_sqlinjection.txt
Posted Nov 22, 2006
Authored by Alfredo Pesoli | Site 0xcafebabe.it

ContentNow CMS version 1.39 is susceptible to SQL injection and path disclosure vulnerabilities.

tags | advisory, vulnerability, sql injection
SHA-256 | 66b8d3c6fb056d3f9c7d05c58697340c1940620e1d27116558ae69297bbb9685

contentnow_139_sqlinjection.txt

Change Mirror Download
ContentNow CMS 1.39 Sql Injection + Path Disclosure Vulnerabilities

Severity : Medium risk
Vendor : www.contentnow.mf4k.de
Author : Alfredo 'revenge' Pesoli

[--------------------------------------------------]

[#] 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 (Manipulation of data)

Exploit : http://www.0xcafebabe.it/sploits/contentnow_139_sqlinj.pl

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 = $cnEngine->configArray[0]['startpageid'];

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

$cnEngine->setId($pid);
...
...

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

As you can see there's no input validation on "pageid" parameter.
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 Bugs discovered
2006/11/20 Vendor contacted
2006/11/21 Vendor response
2006/11/21 New version 1.40 patched
2006/11/22 Public Disclosure

Alfredo 'revenge' Pesoli
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close