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 organization. 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 organization 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 organization 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 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 sanitized.
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.
1.1. http://www.modulo.com/it-grc-articles/ [name of an arbitrarily supplied request parameter]next
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.modulo.com
Path:
/it-grc-articles/
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 d8eab%2522%253e%253cscript%253ealert%25281%2529%253c%252fscript%253e90871a7a09f was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as d8eab\\\"><script>alert(1)</script>90871a7a09f 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.
The value of the animation_fun request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload c7c4a%3balert(1)//09f35d165bb was submitted in the animation_fun parameter. This input was echoed as c7c4a;alert(1)//09f35d165bb 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 animation_interval request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 7f84c%3balert(1)//a46eea25777 was submitted in the animation_interval parameter. This input was echoed as 7f84c;alert(1)//a46eea25777 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 animation_speed request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 2a396%3balert(1)//27c051a6c8f was submitted in the animation_speed parameter. This input was echoed as 2a396;alert(1)//27c051a6c8f 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 animation_type request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 74a03%3balert(1)//55fe1c72c3b was submitted in the animation_type parameter. This input was echoed as 74a03;alert(1)//55fe1c72c3b 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 mouseover request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload e71d3%3balert(1)//6c3940635ed was submitted in the mouseover parameter. This input was echoed as e71d3;alert(1)//6c3940635ed 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 bgcolor request parameter is copied into the HTML document as plain text between tags. The payload d221f<img%20src%3da%20onerror%3dalert(1)>c6ffab5c5dd was submitted in the bgcolor parameter. This input was echoed as d221f<img src=a onerror=alert(1)>c6ffab5c5dd 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 bordercolor request parameter is copied into the HTML document as plain text between tags. The payload 6018e<img%20src%3da%20onerror%3dalert(1)>75e187ba5ac was submitted in the bordercolor parameter. This input was echoed as 6018e<img src=a onerror=alert(1)>75e187ba5ac 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 hlinkcolor request parameter is copied into the HTML document as plain text between tags. The payload 507b9<img%20src%3da%20onerror%3dalert(1)>2eaf54c7e14 was submitted in the hlinkcolor parameter. This input was echoed as 507b9<img src=a onerror=alert(1)>2eaf54c7e14 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 interfaceWidth request parameter is copied into the HTML document as plain text between tags. The payload a9048<img%20src%3da%20onerror%3dalert(1)>43d7e60ceb1 was submitted in the interfaceWidth parameter. This input was echoed as a9048<img src=a onerror=alert(1)>43d7e60ceb1 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 linkcolor request parameter is copied into the HTML document as plain text between tags. The payload 3a038<img%20src%3da%20onerror%3dalert(1)>609185eec25 was submitted in the linkcolor parameter. This input was echoed as 3a038<img src=a onerror=alert(1)>609185eec25 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 moduleHeight request parameter is copied into the HTML document as plain text between tags. The payload e8848<img%20src%3da%20onerror%3dalert(1)>b3a58951343 was submitted in the moduleHeight parameter. This input was echoed as e8848<img src=a onerror=alert(1)>b3a58951343 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 moduleWidth request parameter is copied into the HTML document as plain text between tags. The payload a6b2e<img%20src%3da%20onerror%3dalert(1)>6e5eb297985 was submitted in the moduleWidth parameter. This input was echoed as a6b2e<img src=a onerror=alert(1)>6e5eb297985 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 set request parameter is copied into the HTML document as plain text between tags. The payload d07fe<img%20src%3da%20onerror%3dalert(1)>d83a8197e3e was submitted in the set parameter. This input was echoed as d07fe<img src=a onerror=alert(1)>d83a8197e3e 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 suffix request parameter is copied into the HTML document as plain text between tags. The payload a2b0d<img%20src%3da%20onerror%3dalert(1)>c20d9067cf8 was submitted in the suffix parameter. This input was echoed as a2b0d<img src=a onerror=alert(1)>c20d9067cf8 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 textleft_color request parameter is copied into the HTML document as plain text between tags. The payload 3ad0b<img%20src%3da%20onerror%3dalert(1)>397536cfcee was submitted in the textleft_color parameter. This input was echoed as 3ad0b<img src=a onerror=alert(1)>397536cfcee 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 img_height request parameter is copied into the HTML document as plain text between tags. The payload 8e245<img%20src%3da%20onerror%3dalert(1)>caaf3b45482 was submitted in the img_height parameter. This input was echoed as 8e245<img src=a onerror=alert(1)>caaf3b45482 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 img_height request parameter is copied into the HTML document as plain text between tags. The payload 33861<x%20style%3dx%3aexpr/**/ession(alert(1))>c0dd913fe90 was submitted in the img_height parameter. This input was echoed as 33861<x style=x:expr/**/ession(alert(1))>c0dd913fe90 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 modid request parameter is copied into the HTML document as plain text between tags. The payload f9165<img%20src%3da%20onerror%3dalert(1)>fae648d767d was submitted in the modid parameter. This input was echoed as f9165<img src=a onerror=alert(1)>fae648d767d 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.