Product page: http://soft.zoneo.net/
Affected versions: Up to and including 2.3 (latest as of writing).
Description:
The user agent string provided by the browser is not sanitized nor
escaped when handled. This string is then outputting into HTML code on
the "Latest visitors > Details" page, leading to HTML injection that can
be abused to perform XSS. For example, the following user agent will
cause a JavaScript dialogbox to pop up as soon as the page is visited:
"><script>alert();</script>
This page can be hidden from the public, in which case only admins can
visit it. However, the script still executes when they do, which could
enable a malicious user agent to steal the phpTrafficA cookie (no
expiry) or other admin credentials.
Proposed fix:
Escape the HTML characters with htmlspecialchars before outputting the
user agent string.
In: Php/stats/statsRecent.inc.php
Line 304:
echo "<tr class=\"data av $even $clrobots $clreturn\"><td
nowrap>$end</td><td> $
align=\"center\"> ".
href=\"./index.php?mode=stats&
title=\"".$strings['
class=\"basic\">$ipText</a>&
align=\"center\"> ".
becomes:
echo "<tr class=\"data av $even $clrobots $clreturn\"><td
nowrap>$end</td><td> $
align=\"center\"> ".
href=\"./index.php?mode=stats&
title=\"".$strings['
class=\"basic\">$ipText</a>&
align=\"center\"> ".
Line 369:
$echo = "<tr><td valign=\"top\" colspan=\"3\">$ip
($whoislink$baniplink)<br>$
class=\"basic\"><tr><td>".
valign=\"top\" colspan=\"2\">".$strings['
class=\"basic\"><tr><td>".
";
becomes:
$echo = "<tr><td valign=\"top\" colspan=\"3\">$ip
($whoislink$baniplink)<br>$
class=\"basic\"><tr><td>".
valign=\"top\" colspan=\"2\">".$strings['
".htmlspecialchars($thisagent)
class=\"basic\"><tr><td>".
";
Best regards,
Daniel Geerts
Komentarų nėra:
Rašyti komentarą