exploit the possibilities
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:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close