SECUNIA ADVISORY ID: SA21859 VERIFY ADVISORY: http://secunia.com/advisories/21859/ CRITICAL: Highly critical IMPACT: Cross Site Scripting, Manipulation of data, System access WHERE: >From remote SOFTWARE: BSQ Sitestats 1.x (component for Joomla) http://secunia.com/product/11854/ DESCRIPTION: Secunia Research has discovered some vulnerabilities in the BSQ Sitestats component for Joomla, which can be exploited by malicious people to conduct cross-site scripting and SQL injection attacks, and to compromise a vulnerable system. 1) Input passed to the "ip" form field parameter when performing an IP Address Lookup is not properly sanitised before being returned to the user. This can be exploited to execute arbitrary HTML and script code in a logged in administrator's browser session in context of an affected site. 2) Input passed to multiple parameters when importing the ip-to-country.csv file is not properly sanitised before being used in a SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code when an administrator is tricked into importing a malicious ip-to-country.csv file. 3) Input passed via the "HTTP Referer", the "HTTP User Agent", and the "HTTP Accept Language" Header in bsqtemplateinc.php is not properly sanitised before being used in SQL queries. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code. Successful exploitation requires that "magic_quotes_gpc" is disabled. 4) Input passed to the "baseDir" parameter in components/com_bsq_sitestats/external/rssfeeds.php is not properly verified before being used to include files. This can be exploited to execute arbitrary PHP code by including files from local or external resources. Successful exploitation requires that "register_globals" is enabled. The vulnerabilities have been confirmed in version 1.8.0. Other versions may also be affected. SOLUTION: Update to version 2.2.1. PROVIDED AND/OR DISCOVERED BY: Sven Krewitt, Secunia Research. ORIGINAL ADVISORY: http://secunia.com/secunia_research/2006-63/