Description: An input validation vulnerability was reported in the RxGoogle script (rxgoogle.cgi). A remote user can conduct cross-site scripting attacks. [Editor's note: This script is not a product of Google.
Shaun Colley reported that the script does not filter user-supplied input. A remote user can create a specially crafted URL that, when loaded by a target user, will cause arbitrary scripting code to be executed by the target user's browser. The code will originate from the site running the RxGoogle software and will run in the security context of that site. As a result, the code will be able to access the target user's cookies (including authentication cookies), if any, associated with the site, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the target user.
Impact: A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running the RxGoogle software, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the target user.
rxgoogle.cgi is... "Provide your website visitors with your own net search program. This script allows your visitor to perform web search within your site without redirecting. You can set up RxGoogle search engine in just minutes and it's FREE!".
rxgoogle.cgi is vulnerable to a simple XSS attack, potentially allowing an attacker to steal a users authentication cookie for that site (if there is one), or insert other malicious code into a search query and trick a legimate user into visiting the URL.
Although rxgoogle.cgi is a new CGI script, and the bug is low risk, I considered this worth posting because a lot of people like to keep an up to date record of ALL CGI scripts known to be insecure in some way or another.
The bug #######
The bug exists due to very bad user-input sanitization, hence a failure to filter bad characters such as metacharacters.
The fix ####### I have written a patch to fix the vulnerability.