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 dded3<img%20src%3da%20onerror%3dalert(1)>66c05b3eab5 was submitted in the REST URL parameter 1. This input was echoed as dded3<img src=a onerror=alert(1)>66c05b3eab5 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses an event handler to introduce arbitrary JavaScript into the document.
The value of REST URL parameter 1 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 2f97e'%3b38730b87fa was submitted in the REST URL parameter 1. This input was echoed as 2f97e';38730b87fa 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.
HTTP/1.1 200 OK Date: Sat, 07 Jan 2012 14:07:24 GMT Server: Apache X-Powered-By: PHP/5.3.8 Set-Cookie: PHPSESSID=h80lr2jasv8as7no9co6145r16; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache P3P: CP="NOI CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT" Set-Cookie: didsearch=1 Set-Cookie: preferences=%3B%3B0%3B1%3Bround%3BIAD%7CSEA%7C20120120%7Cfalse%7Cfalse%7Canytime%3ASEA%7CIAD%7C20120122%7Cfalse%7Cfalse%7Canytime%3B%3B%3B%3B%3B%3B%3B%3B; expires=Fri, 07-Jan-2022 00:15:04 GMT; path=/ Set-Cookie: rsearch=IAD%3ASEA%7C20120120%3A20120122%7Canytime%3Aanytime%7C%7C1%7C0%7Cno%7Cfalse%3Afalse%3B; expires=Sat, 28-Jan-2012 14:07:24 GMT Connection: close Content-Length: 34692 Vary: Accept-Encoding Content-Type: text/html;charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/ ...[SNIP]... lcomeBack":true,"codeshares":true,"logCodeshareStats":true,"afsCenterColumnPlacement":true,"wifiAvailability":true,"feesEstimator":true}; var TA_HOST = 'http://www.tripadvisor.com'; var LOCALE = 'en_US2f97e';38730b87fa'; var INVENTORY = 'en_US'; var INVENTORY_COUNTRY = 'US'; var TRIPADVISOR_READONLY = false; var TYPEAHEAD_URL = 'http://www.tripadvisor.com/TypeAheadJson?action=AIRPORT&callback=?&query='; var L_LEVEL ...[SNIP]...
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload eb900"><img%20src%3da%20onerror%3dalert(1)>c84391c79f5 was submitted in the REST URL parameter 1. This input was echoed as eb900"><img src=a onerror=alert(1)>c84391c79f5 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses an event handler to introduce arbitrary JavaScript into the document.
The value of the cms request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 2324e'%3balert(1)//04d51ddb831 was submitted in the cms parameter. This input was echoed as 2324e';alert(1)//04d51ddb831 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 slice request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload eed47'%3balert(1)//8433e4e347a was submitted in the slice parameter. This input was echoed as eed47';alert(1)//8433e4e347a 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 REST URL parameter 1 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 4ac2d'%3bb6affe968fe was submitted in the REST URL parameter 1. This input was echoed as 4ac2d';b6affe968fe 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.
Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.
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 Date: Sat, 07 Jan 2012 14:07:42 GMT Server: Apache X-Powered-By: PHP/5.3.8 Set-Cookie: PHPSESSID=i5ajs4ej4t43eou7hhihh3ht82; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache P3P: CP="NOI CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT" Set-Cookie: didsearch=1 Set-Cookie: preferences=%3B%3B0%3B1%3Bround%3BIAD%7CSEA%7C20120120%7Cfalse%7Cfalse%7Canytime%3ASEA%7CIAD%7C20120122%7Cfalse%7Cfalse%7Canytime%3B%3B%3B%3B%3B%3B%3B%3B; expires=Fri, 07-Jan-2022 00:15:22 GMT; path=/ Set-Cookie: rsearch=IAD%3ASEA%7C20120120%3A20120122%7Canytime%3Aanytime%7C%7C1%7C0%7Cno%7Cfalse%3Afalse%3B; expires=Sat, 28-Jan-2012 14:07:42 GMT Connection: close Content-Length: 34703 Vary: Accept-Encoding Content-Type: text/html;charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/ ...[SNIP]... lcomeBack":true,"codeshares":true,"logCodeshareStats":true,"afsCenterColumnPlacement":true,"wifiAvailability":true,"feesEstimator":true}; var TA_HOST = 'http://www.tripadvisor.com'; var LOCALE = 'en_US4ac2d';b6affe968fe'; var INVENTORY = 'en_US'; var INVENTORY_COUNTRY = 'US'; var TRIPADVISOR_READONLY = false; var TYPEAHEAD_URL = 'http://www.tripadvisor.com/TypeAheadJson?action=AIRPORT&callback=?&query='; var L_LEVEL ...[SNIP]...
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 6bead"><img%20src%3da%20onerror%3dalert(1)>620bbf2b724 was submitted in the REST URL parameter 1. This input was echoed as 6bead"><img src=a onerror=alert(1)>620bbf2b724 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses an event handler to introduce arbitrary JavaScript into the document.
Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.
The value of the cms request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 26a7c'-alert(1)-'3bd094bd8f5 was submitted in the cms 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.
Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.
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 slice request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 726eb'-alert(1)-'b9b7c6f01a0 was submitted in the slice 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.
Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.
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 REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload cf735<script>alert(1)</script>ea66228af3f 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 22:03:05 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 243 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/favicon.icocf735<script>alert(1)</script>ea66228af3f" was not found on this server.</p> ...[SNIP]...
1.11. http://output39.rssinclude.com/favicon.ico [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://output39.rssinclude.com
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 ab1e4<script>alert(1)</script>4ae4528ce59 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 22:03:00 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 246 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/favicon.ico?ab1e4<script>alert(1)</script>4ae4528ce59=1" was not found on this server.</p> ...[SNIP]...
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 52c19<script>alert(1)</script>dac761c580a 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 21:11:06 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Set-Cookie: PHPSESSID=b2uh80bhau2hfu8jjicvsbhr04; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 294 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/output52c19<script>alert(1)</script>dac761c580a?type=js&id=257164&hash=285b3d37b916df171213430b6d484565" was not found on this server.</p> ...[SNIP]...
The value of REST URL parameter 1 is copied into the HTML document as plain text between tags. The payload 207eb<script>alert(1)</script>93ab3e6d042 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 22:03:15 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 343 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/output52c19%3Cscript%3Ealert(1)%3C207eb<script>alert(1)</script>93ab3e6d042/script%3Edac761c580a?type=js&id=257164&hash=285b3d37b916df171213430b6d484565" was not found on this server.</p> ...[SNIP]...
The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload 3204b<script>alert(1)</script>8e18c9409d6 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 22:03:17 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 343 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/output52c19%3Cscript%3Ealert(1)%3C/script%3Edac761c580a3204b<script>alert(1)</script>8e18c9409d6?type=js&id=257164&hash=285b3d37b916df171213430b6d484565" was not found on this server.</p> ...[SNIP]...
The value of the hash request parameter is copied into the HTML document as plain text between tags. The payload 73188<script>alert(1)</script>297f53218e0 was submitted in the hash 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 22:03:02 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 343 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/output52c19%3Cscript%3Ealert(1)%3C/script%3Edac761c580a?type=js&id=257164&hash=285b3d37b916df171213430b6d48456573188<script>alert(1)</script>297f53218e0" was not found on this server.</p> ...[SNIP]...
The value of the id request parameter is copied into the HTML document as plain text between tags. The payload 6763b<script>alert(1)</script>157cfd9346c was submitted in the id 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 22:03:00 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 343 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/output52c19%3Cscript%3Ealert(1)%3C/script%3Edac761c580a?type=js&id=2571646763b<script>alert(1)</script>157cfd9346c&hash=285b3d37b916df171213430b6d484565" was not found on this server.</p> ...[SNIP]...
1.17. http://output39.rssinclude.com/output52c19%3Cscript%3Ealert(1)%3C/script%3Edac761c580a [name of an arbitrarily supplied request parameter]previousnext
The name of an arbitrarily supplied request parameter is copied into the HTML document as plain text between tags. The payload e3a67<script>alert(1)</script>4fe985fb526 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 22:03:10 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 346 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/output52c19%3Cscript%3Ealert(1)%3C/script%3Edac761c580a?type=js&id=257164&hash=285b3d37b916df171213430b6d484565&e3a67<script>alert(1)</script>4fe985fb526=1" was not found on this server.</p> ...[SNIP]...
The value of the type request parameter is copied into the HTML document as plain text between tags. The payload b8fc5<script>alert(1)</script>b1ef89fb995 was submitted in the type 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.
HTTP/1.1 404 Not Found Date: Sun, 25 Dec 2011 22:02:58 GMT Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze3 with Suhosin-Patch X-Powered-By: PHP/5.3.3-7+squeeze3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 343 Connection: close Content-Type: text/html
<html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL "/output52c19%3Cscript%3Ealert(1)%3C/script%3Edac761c580a?type=jsb8fc5<script>alert(1)</script>b1ef89fb995&id=257164&hash=285b3d37b916df171213430b6d484565" was not found on this server.</p> ...[SNIP]...
The value of the comm request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload b6998"%3balert(1)//5a341605cd4 was submitted in the comm parameter. This input was echoed as b6998";alert(1)//5a341605cd4 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 s request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload dd9e4'%3balert(1)//c2d4b6fcfa4 was submitted in the s parameter. This input was echoed as dd9e4';alert(1)//c2d4b6fcfa4 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.
1.21. http://www.bookingbuddy.com/ad_wrapper.php [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.bookingbuddy.com
Path:
/ad_wrapper.php
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 f7233'%3balert(1)//87caaad782e was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as f7233';alert(1)//87caaad782e 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 request request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload b4f62'%3balert(1)//5efa129e83 was submitted in the request parameter. This input was echoed as b4f62';alert(1)//5efa129e83 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 REST URL parameter 1 is copied into an HTML comment. The payload a3d98--><script>alert(1)</script>a15b4a9f79 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 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.
The value of REST URL parameter 2 is copied into an HTML comment. The payload cc84f--><script>alert(1)</script>9b8baf58e0e 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 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.
The value of the callback request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 15027%3balert(1)//b7bd11dc53f was submitted in the callback parameter. This input was echoed as 15027;alert(1)//b7bd11dc53f 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 REST URL parameter 1 is copied into an HTML comment. The payload 31c7a--><script>alert(1)</script>d26780d64ec 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 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.
The value of REST URL parameter 2 is copied into an HTML comment. The payload c9655--><script>alert(1)</script>dd3ee735d36 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 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.
The value of REST URL parameter 3 is copied into an HTML comment. The payload 1a0ac--><script>alert(1)</script>0b6b35067eb 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 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.
The value of REST URL parameter 1 is copied into an HTML comment. The payload 98872--><script>alert(1)</script>6d84aff502e 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 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.
The value of REST URL parameter 2 is copied into an HTML comment. The payload 721a5--><script>alert(1)</script>7a22260eb76 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 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.
The value of REST URL parameter 3 is copied into an HTML comment. The payload 3abab--><script>alert(1)</script>ab9ee318ef8 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 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.
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload cc95b"><script>alert(1)</script>538949ae1fd 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 value of an HTML tag attribute which is encapsulated in double quotation marks. The payload e5d37"><script>alert(1)</script>646dc6198dc 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 value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 7aa86"><script>alert(1)</script>ffde9a447d0 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 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload c6581"><script>alert(1)</script>8bdbf5405c 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 value of an HTML tag attribute which is encapsulated in double quotation marks. The payload ffa09"><script>alert(1)</script>3b65e62e778 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 value of an HTML tag attribute which is encapsulated in double quotation marks. The payload f7460"><script>alert(1)</script>fbb2ad121c5 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 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 4e772"><script>alert(1)</script>016122a1aef 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 value of an HTML tag attribute which is encapsulated in double quotation marks. The payload abbf4"><script>alert(1)</script>75e2000d6cb 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 value of an HTML tag attribute which is encapsulated in double quotation marks. The payload a8179"><script>alert(1)</script>84f3e77de9d 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 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload bd1dd"><script>alert(1)</script>b28daab2977 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 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 3210f"><script>alert(1)</script>96b5bf3bdb0 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 the Referer HTTP header is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload cd57e"><a>5cafd53c993 was submitted in the Referer HTTP header. This input was echoed unmodified in the application's response.
This behaviour demonstrates that it is possible to inject new HTML tags into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.
Because the user data that is copied into the response is submitted within a request header, the application's behaviour is not trivial to exploit in an attack against another user. In the past, methods have existed of using client-side technologies such as Flash to cause another user to make a request containing an arbitrary HTTP header. If you can use such a technique, you can probably leverage it to exploit the XSS flaw. This limitation partially mitigates the impact of the vulnerability.
The value of the Referer HTTP header is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 14379"><a>ba267322b7f was submitted in the Referer HTTP header. This input was echoed unmodified in the application's response.
This behaviour demonstrates that it is possible to inject new HTML tags into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.
Because the user data that is copied into the response is submitted within a request header, the application's behaviour is not trivial to exploit in an attack against another user. In the past, methods have existed of using client-side technologies such as Flash to cause another user to make a request containing an arbitrary HTTP header. If you can use such a technique, you can probably leverage it to exploit the XSS flaw. This limitation partially mitigates the impact of the vulnerability.