tinyguestbook Script Insertion and SQL Injection Vulnerabilities
Description
Multiple vulnerabilities have been discovered in tinyguestbook, which can be exploited by malicious people to conduct script insertion and SQL injection attacks.
1) Input passed via the "msg" parameter to sign.php when signing the guestbook is not properly sanitised before being used. This can be exploited to insert arbitrary HTML and script code, which will be executed in a user's browser session in context of an affected site when the malicious data is being viewed.
2) Input passed via the "name" and "msg" POST parameters to sign.php (when "post" is set to "submit" and "code" is set correctly) is not properly sanitised before being used in a SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
Successful exploitation of this vulnerability requires that "magic_quotes_gpc" is disabled.
Vulnerable Products
Vulnerable Software: tinyguestbook
Solution
Edit the source code to ensure that input is properly sanitised.