Activity log for bug #1056997

Date Who What changed Old value New value Message
2012-09-26 16:07:32 Uranium235 bug added bug
2012-09-26 16:18:13 Uranium235 description The function sanitize() in functions.all.php does not escape properly. Backslashes need to be escaped before escaping the single quotes. Right now it is possible to inject and run php code. I do not know exactly if it is possible for an attacker to exploit the vulnerability without having admin (write) access first in the standard installation. But I imagine that plugins may exist - at least in the future - that use this function and allow non admin users to store information (like a guestbook) and potentially exploit the vulnerability. Besides that it is possible to break the pluck installation for an admin when using the combination of single quote with an preceding backslash as field value. Example save the following to a page in tinymce html mode: <a href="#" title="\';phpinfo();$x=\'">test</a> fix: function sanitize($var, $html = true) { $var = str_replace('\\', '\\\\', $var); $var = str_replace('\'', '\\\'', $var); if ($html == true) $var = htmlspecialchars($var, ENT_COMPAT, 'UTF-8', false); return $var; } The function sanitize() in functions.all.php does not escape properly. Backslashes need to be escaped before escaping the single quotes. Right now it is possible to inject and run php code. I do not know exactly if it is possible for an attacker to exploit the vulnerability without having admin (write) access first in the standard installation. But I imagine that plugins may exist - at least in the future - that use this function and allow non admin users to store information (like a guestbook) and potentially exploit the vulnerability. Besides that it is possible to break the pluck installation for an admin when using the combination of single quote with an preceding backslash as field value. Example save the following to a page in tinymce html mode: <a href="#" title="\';phpinfo();?>">test</a> fix: function sanitize($var, $html = true) {  $var = str_replace('\\', '\\\\', $var);  $var = str_replace('\'', '\\\'', $var);  if ($html == true)   $var = htmlspecialchars($var, ENT_COMPAT, 'UTF-8', false);  return $var; }
2012-10-04 16:33:35 Launchpad Janitor branch linked lp:~uranium235/pluck-cms/pluck-cms
2012-10-04 17:16:31 Uranium235 pluck-cms: status New Fix Committed
2012-10-06 12:58:49 Anders G. Jørgensen pluck-cms: importance Undecided Critical
2012-12-21 19:29:17 Uranium235 information type Private Security Public Security
2012-12-21 19:29:25 Uranium235 pluck-cms: assignee Uranium235 (uranium235)