[SECURITY] XSS in Indexed Search statistics
authorSteffen Gebert <steffen.gebert@typo3.org>
Wed, 15 Aug 2012 10:18:20 +0000 (12:18 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 15 Aug 2012 10:18:24 +0000 (12:18 +0200)
Indexed Search statistics module is vulnerable to
persistent XSS attack injected by arbitrary frontend users.

Change-Id: I084bffd1e0b489e6f061f5672f7fb12b3bab1aee
Fixes: #31927
Releases: 6.0, 4.7, 4.6, 4.5
Security-Commit: 62ae11e97b563746bed0884d8f3d52d8fc3ea84a
Security-Bulletin: TYPO3-CORE-SA-2012-004
Reviewed-on: http://review.typo3.org/13746
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/indexed_search/modfunc2/class.tx_indexedsearch_modfunc2.php

index dbaf05b..4241412 100644 (file)
@@ -152,7 +152,7 @@ class tx_indexedsearch_modfunc2 extends t3lib_extobjbase {
                if ($res)       {
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))      {
                                $i++;
-                               $table1.='<tr class="bgColor4"><td>'.$i.'.</td><td>'.$row['word'].'</td><td>&nbsp;&nbsp;'.$row['c'].'</td></tr>';
+                               $table1 .= '<tr class="bgColor4"><td>' . $i . '.</td><td>' . htmlspecialchars($row['word']) . '</td><td>&nbsp;&nbsp;' . $row['c'] . '</td></tr>';
                        }
                }