Sorry, don't have much time to search the forum, because it's quite late and I have to get up early.
There is a possible SQL-Injection in the file
modules/TinyMCE/content_css.php
around line 110.
the code there is:
Code: Select all
102 $db=pg_connect("host=".$config['db_hostname']." dbname=".$config['db_name']." user=".$config['db_username']." password=".$con
103 if ($name != '')
104 $sql="SELECT css_text, css_name FROM ".$config['db_prefix']."css WHERE css_name = '" . pg_escape_string($name) . "'";
105 else
106 $sql="SELECT c.css_text, c.css_id, c.css_name FROM ".$config['db_prefix']."css c,".$config['db_prefix']."css_assoc ac
107 WHERE ac.assoc_type='template' AND ac.assoc_to_id = ". pg_escape_string($templateid) ."
108 AND ac.assoc_css_id = c.css_id AND c.media_type = '" . pg_escape_string($mediatype) . "'
109 ORDER BY ac.create_date";
110 $result=pg_query($db, $sql);
http://www.yourhostname.com//modules/Ti ... *%22This*/
it is still possible to alter the SQL-Query to something like this
SELECT c.css_text, c.css_id, c.css_name FROM cms_css c,cms_css_assoc ac WHERE ac.assoc_type='template' AND ac.assoc_to_id = -1/**/UNION/**/SELECT/**/username,1,password/**/FROM/**/cms_users/*"This*/ AND ac.assoc_css_id = c.css_id AND c.media_type = '' ORDER BY ac.create_date
because field assoc_to_id in table cms_css_assoc is of type integer,
I highly recommend to change the lines
Code: Select all
34 if (isset($_GET["templateid"])) $templateid = $_GET["templateid"];
Code: Select all
34 if (isset($_GET["templateid"])) $templateid = intval( $_GET["templateid"] );
SELECT c.css_text, c.css_id, c.css_name FROM cms_css c,cms_css_assoc ac WHERE ac.assoc_type='template' AND ac.assoc_to_id = -1 AND ac.assoc_css_id = c.css_id AND c.media_type = '' ORDER BY ac.create_date
Sorry to post this here, but I really dont have much time and if I wouldn't have postet it now, I surely would have forgotten to report it.
greetz,
dominik