Lucene search
K

Sefrengo CMS 1.6.1 SQL Injection

🗓️ 01 Feb 2015 00:00:00Reported by Nguyen Hung TuanType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 53 Views

Sefrengo CMS v1.6.1 SQL Injection vulnerabilities affecting ac_get_value function and set_value function. ITAS Team disclosed the vulnerabilities, and the vendor has released a patch

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Sefrengo CMS 1.6.1 - Multiple SQL Injection Vulnerabilities
3 Feb 201500:00
zdt
CNVD
Multiple SQL Injection Vulnerabilities in Sefrengo CMS
4 Feb 201500:00
cnvd
CVE
CVE-2015-1428
3 Feb 201516:00
cve
Cvelist
CVE-2015-1428
3 Feb 201516:00
cvelist
Exploit DB
Sefrengo CMS 1.6.1 - Multiple SQL Injections
2 Feb 201500:00
exploitdb
EUVD
EUVD-2015-1563
7 Oct 202500:30
euvd
exploitpack
Sefrengo CMS 1.6.1 - Multiple SQL Injections
2 Feb 201500:00
exploitpack
NVD
CVE-2015-1428
3 Feb 201516:59
nvd
Prion
Sql injection
3 Feb 201516:59
prion
securityvulns
Sefrengo CMS v1.6.1 - Multiple SQL Injection Vulnerabilities
2 Feb 201500:00
securityvulns
Rows per page
`# Exploit Title: Sefrengo CMS v1.6.1 - Multiple SQL Injection Vulnerabilities   
# Google Dork: N/A  
# Date: 01/26/2015  
# Exploit Author: Nguyen Hung Tuan ([email protected]) & ITAS Team (www.itas.vn)  
# Vendor Homepage: http://www.sefrengo.org/   
# Software Link: http://forum.sefrengo.org/index.php?showtopic=3368 (https://github.com/sefrengo-cms/sefrengo-1.x/tree/22c0d16bfd715631ed317cc990785ccede478f07)  
# Version: Sefrengo CMS v1.6.1  
# Tested on: Linux  
# CVE : CVE-2015-1428  
  
  
  
::PROOF OF CONCEPT::  
  
Link 1:  
  
- Vulnerable file: /backend/external/phplib/ct_sql.inc  
- Vulnerable function: function ac_get_value($id, $name)  
- Vulnerable parameter: $id  
- Vulnerable code:   
function ac_get_value($id, $name) {  
global $cms_db;  
$this->db->query(sprintf("select val from %s where sid = '%s' and name = '%s'",  
$cms_db['sessions'],  
$id,  
addslashes($name)));  
if ($this->db->next_record()) {  
$str = $this->db->f("val");  
$str2 = base64_decode( $str );  
  
if ( ereg("^".$name.":.*", $str2) ) {  
$str = ereg_replace("^".$name.":", "", $str2 );  
} else {  
  
$str3 = stripslashes( $str );  
  
if ( ereg("^".$name.":.*", $str3) ) {  
$str = ereg_replace("^".$name.":", "", $str3 );  
} else {  
  
switch ( $this->encoding_mode ) {  
case "slashes":  
$str = stripslashes($str);  
break;  
  
case "base64":  
default:  
$str = base64_decode($str);  
}  
}  
};  
return $str;  
};  
return "";  
}  
  
Link 2:  
  
- Vulnerable file: /backend/inc/class.values_ct.php  
- Vulnerable function: function set_value($mixed)  
- Vulnerable parameter: $mixed['id']  
- Vulnerable code:   
function set_value($mixed)  
{  
global $cms_db, $db;  
//build query  
  
$sql_group = (empty($mixed['group'])) ? 0: ''.$mixed['group'];  
$sql_client = (empty($mixed['client'])) ? '': 'AND idclient IN ('. $mixed['client'] .')';  
$sql_lang = (empty($mixed['lang'])) ? '': 'AND idlang IN ('. $mixed['lang'] .')';  
$sql_key = (empty($mixed['key'])) ? '': 'AND V.key1 = "'. $mixed['key'] . '" ';  
$sql_key2 = (empty($mixed['key2'])) ? '': 'AND V.key2 = "'. $mixed['key2'] . '" ';  
$sql_key3 = (empty($mixed['key3'])) ? '': 'AND V.key3 = "'. $mixed['key3'] . '" ';  
$sql_key4 = (empty($mixed['key4'])) ? '': 'AND V.key4 = "'. $mixed['key4'] . '" ';  
$sql_id = (empty($mixed['id'])) ? "": "AND V.idvalues = '". $mixed['id'] . "' ";  
  
  
$sql = "SELECT *  
FROM ". $cms_db['values'] ." AS V  
WHERE V.group_name IN ('$sql_group')  
$sql_client $sql_lang  
$sql_key $sql_key2 $sql_key3 $sql_key4 $sql_id";  
  
//die($sql);  
$db -> query($sql);  
  
$count_rows = $db ->num_rows();  
  
if($count_rows > 1){  
echo $sql .'<br> Fehler in Klasse "cms_value_ct". Es wurde mehr als ein Ergebnis gefunden. Anfrage ist nicht eindeutig';  
exit;  
}  
elseif($count_rows == 1){  
$db -> next_record();  
$mixed['id'] = $db -> f('idvalues');  
//echo "update";  
$this -> _update_by_id($mixed);  
}  
else{  
$this -> insert($mixed);  
}  
  
}  
  
::DISCLOSURE::  
+ 01/08/2015: Send the detail of vulnerabilities to vendor and Vendor confirmed  
+ 01/25/2015: Vendor releases patch  
+ 01/26/2015: ITAS Team publishes information  
  
::REFERENCE::  
- Detail and videos: http://www.itas.vn/news/itas-team-found-out-multiple-sql-injection-vulnerabilities-in-sefrengo-cms-v1-6-1-74.html  
- https://github.com/sefrengo-cms/sefrengo-1.x/commit/22c0d16bfd715631ed317cc990785ccede478f07  
  
  
  
  
::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.  
  
::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.  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Feb 2015 00:00Current
0.2Low risk
Vulners AI Score0.2
EPSS0.01412
53