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

Radexscript CMS 2.2.0 SQL Injection

Radexscript CMS 2.2.0 SQL Injection
Posted Feb 9, 2015
Authored by Pham Kien Cuong

Radexscript CMS version 2.2.0 suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
advisories | CVE-2015-1518
SHA-256 | 9d25ec63bf90be0fe55d2ed9ed9a0e230f1fd97452b45e9cfde668101a50c2c1

Radexscript CMS 2.2.0 SQL Injection

Change Mirror Download
#Vulnerability title: Radexscript CMS 2.2.0 - SQL Injection vulnerability
#Vendor: http://redaxscript.com/
#Product: Radexscript CMS
#Software link: http://redaxscript.com/download/releases
#Affected version: Redaxscript 2.2.0
#Fixed version: Redaxscript 2.3.0
#CVE ID: CVE-2015-1518
#Author: Pham Kien Cuong (cuong.k.pham@itas.vn) & ITAS Team (www.itas.vn)



:: PROOF OF CONCEPT ::

POST /redaxscript/ HTTP/1.1
Host: target.local
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101
Firefox/34.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: PHPSESSID=khtnnm1tvvk3s12if0no367872;
GEAR=local-5422433b500446ead50002d4
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 96

search_terms=[SQL INJECTION
HERE]&search_post=&token=24bcb285bc6f5c93203e4f95d9f2008331faf294&search_pos
t=Search



- Vulnerable parameter: $search_terms
- Vulnerable file: redaxscript/includes/search.php
- Vulnerable function: search_post()

- Vulnerable code:
function search_post()
{
/* clean post */

if (ATTACK_BLOCKED < 10)
{
$search_terms = clean($_POST['search_terms'], 5);
}

/* validate post */

if (strlen($search_terms) < 3 || $search_terms == l('search_terms'))
{
$error = l('input_incorrect');
}

/* query results */

else
{
$search = array_filter(explode(' ', $search_terms));
$search_keys = array_keys($search);
$last = end($search_keys);

/* query search */

$query = 'SELECT id, title, alias, description, date,
category, access FROM ' . PREFIX . 'articles WHERE (language = \'' .
Redaxscript\Registry::get('language') . '\' || language = \'\') && status =
1';
if ($search)
{
$query .= ' && (';
foreach ($search as $key => $value)
{

$query .= 'title LIKE \'%' . $value . '%\'
|| description LIKE \'%' . $value . '%\' || keywords LIKE \'%' . $value .
'%\' || text LIKE \'%' . $value . '%\'';
if ($last != $key)
{
$query .= ' || ';
}
}
$query .= ')';
}
$query .= ' ORDER BY date DESC LIMIT 50';
$result =
Redaxscript\Db::forTablePrefix('articles')->rawQuery($query)->findArray();
$num_rows = count($result);
if ($result == '' || $num_rows == '')
{
$error = l('search_no');
}

/* collect output */

else if ($result)
{
$accessValidator = new
Redaxscript\Validator\Access();
$output = '<h2 class="title_content
title_search_result">' . l('search') . '</h2>';
$output .= form_element('fieldset', '',
'set_search_result', '', '', '<span class="title_content_sub
title_search_result_sub">' . l('articles') . '</span>') . '<ol
class="list_search_result">';
foreach ($result as $r)
{
$access = $r['access'];

/* if access granted */

if ($accessValidator->validate($access,
MY_GROUPS) === Redaxscript\Validator\Validator::PASSED)
{
if ($r)
{
foreach ($r as $key =>
$value)
{
$$key =
stripslashes($value);
}
}

/* prepare metadata */

if ($description == '')
{
$description = $title;
}
$date = date(s('date'),
strtotime($date));

/* build route */

if ($category == 0)
{
$route = $alias;
}
else
{
$route =
build_route('articles', $id);
}

/* collect item output */

$output .= '<li
class="item_search_result">' . anchor_element('internal', '',
'link_search_result', $title, $route, $description) . '<span
class="date_search_result">' . $date . '</span></li>';
}
else
{
$counter++;
}
}
$output .= '</ol></fieldset>';

/* handle access */

if ($num_rows == $counter)
{
$error = l('access_no');
}
}
}

/* handle error */

if ($error)
{
notification(l('something_wrong'), $error);
}
else
{
echo $output;
}
}


:: SOLUTION ::
Update to Redaxscript 2.3.0

:: INFORMATION DISCLOSURE ::
- 11/27/2014: Inform the vendor
- 11/28/2014: Vendor confirmed
- 01/29/2015: Vendor releases patch
- 01/05/2015: ITAS Team publishes information


:: REFERENCE ::
-
http://www.itas.vn/news/itas-team-found-out-a-sql-injection-vulnerability-in
-redaxscript-2-2-0-cms-75.html

::COPYRIGHT::
Copyright (c) ITAS CORP 2014, All rights reserved worldwide. Permission is
hereby granted for the electronic redistribution of this information. It is
not to be edited or altered in any way without the express written consent
of ITAS CORP (www.itas.vn).

:: DISCLAIMER ::
THE INFORMATION PRESENTED HEREIN ARE PROVIDED ?AS IS? WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, ANY
IMPLIED WARRANTIES AND MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
OR WARRANTIES OF QUALITY OR COMPLETENESS. THE INFORMATION PRESENTED HERE IS
A SERVICE TO THE SECURITY COMMUNITY AND THE PRODUCT VENDORS. ANY APPLICATION
OR DISTRIBUTION OF THIS INFORMATION CONSTITUTES ACCEPTANCE ACCEPTANCE AS IS,
AND AT THE USER'S OWN RISK.



Best Regards,
----------------------------------------------------------------------------
----------------
ITAS Team (www.itas.vn)
Login or Register to add favorites

File Archive:

March 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    13 Files
  • 3
    Mar 3rd
    15 Files
  • 4
    Mar 4th
    0 Files
  • 5
    Mar 5th
    0 Files
  • 6
    Mar 6th
    16 Files
  • 7
    Mar 7th
    31 Files
  • 8
    Mar 8th
    16 Files
  • 9
    Mar 9th
    13 Files
  • 10
    Mar 10th
    9 Files
  • 11
    Mar 11th
    0 Files
  • 12
    Mar 12th
    0 Files
  • 13
    Mar 13th
    10 Files
  • 14
    Mar 14th
    6 Files
  • 15
    Mar 15th
    17 Files
  • 16
    Mar 16th
    22 Files
  • 17
    Mar 17th
    13 Files
  • 18
    Mar 18th
    0 Files
  • 19
    Mar 19th
    0 Files
  • 20
    Mar 20th
    16 Files
  • 21
    Mar 21st
    13 Files
  • 22
    Mar 22nd
    5 Files
  • 23
    Mar 23rd
    6 Files
  • 24
    Mar 24th
    47 Files
  • 25
    Mar 25th
    0 Files
  • 26
    Mar 26th
    0 Files
  • 27
    Mar 27th
    50 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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