Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.
The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.
Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).
The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.
Remediation background
In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defences:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.
The value of the cmbcountry request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 4cfe7'%3balert(1)//9e0d3ca50b8eefe0b was submitted in the cmbcountry parameter. This input was echoed as 4cfe7';alert(1)//9e0d3ca50b8eefe0b in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
Remediation detail
Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.
The value of the txtac_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d1ade"><script>alert(1)</script>52b13356a49e01fb8 was submitted in the txtac_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtaddr1_1 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload c731b"><script>alert(1)</script>7435be6b9ef62864a was submitted in the txtaddr1_1 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtaddr2 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 15840"><script>alert(1)</script>ff8fa065992235abf was submitted in the txtaddr2 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtcc_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 710fd"><script>alert(1)</script>885bb022ee0f31720 was submitted in the txtcc_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtcity_1_19 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload abdb2"><script>alert(1)</script>2ea1a2ed2a8e249c6 was submitted in the txtcity_1_19 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtemail_1_2 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 407a7"><script>alert(1)</script>ef158c8b75bc25879 was submitted in the txtemail_1_2 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtfac_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 9612f"><script>alert(1)</script>c50b4edd9861c2314 was submitted in the txtfac_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtfcc_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 345d2"><script>alert(1)</script>f77cc7cc4d084091d was submitted in the txtfcc_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtfirst_1_3 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 8ab85"><script>alert(1)</script>7ea1e719ace70be49 was submitted in the txtfirst_1_3 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtfnumber_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 6cdd7"><script>alert(1)</script>2f1056a172a9ab503 was submitted in the txtfnumber_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtlast_1_3 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload f54c1"><script>alert(1)</script>5378bc6c21269182 was submitted in the txtlast_1_3 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtmac_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 445a0"><script>alert(1)</script>e49597f4ab3106751 was submitted in the txtmac_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtmcc_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 9859a"><script>alert(1)</script>cacdf99fcc8ca33ae was submitted in the txtmcc_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtmnumber_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 9dafd"><script>alert(1)</script>7ce1b92a3d9606684 was submitted in the txtmnumber_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtnum_4 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 5ce1d"><script>alert(1)</script>eeb6e3b25cb87ca was submitted in the txtnum_4 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtpost_1_6 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload ff205"><script>alert(1)</script>be48e0e9b12390799 was submitted in the txtpost_1_6 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtpwd request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 6e1f7"><script>alert(1)</script>d0d6246fd2565e162 was submitted in the txtpwd 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the txtstother_3 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload f02e8"><script>alert(1)</script>9a4830cdd3fca9d42 was submitted in the txtstother_3 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
2. Password field with autocomplete enabledpreviousnext
Summary
Severity:
Low
Confidence:
Certain
Host:
https://portal.realvps.com
Path:
/
Issue detail
The page contains a form with the following action URL:
https://portal.realvps.com/
The form contains the following password fields with autocomplete enabled:
txtpwd
txtrpwd_1
txtpwd_1_37%8
Issue background
Most browsers have a facility to remember user credentials that are entered into HTML forms. This function can be configured by the user and also by applications which employ user credentials. If the function is enabled, then credentials entered by the user are stored on their local computer and retrieved by the browser on future visits to the same application.
The stored credentials can be captured by an attacker who gains access to the computer, either locally or through some remote compromise. Further, methods have existed whereby a malicious web site can retrieve the stored credentials for other applications, by exploiting browser vulnerabilities or through application-level cross-domain attacks.
Issue remediation
To prevent browsers from storing credentials entered into HTML forms, you should include the attribute autocomplete="off" within the FORM tag (to protect all form fields) or within the relevant INPUT tags (to protect specific individual fields).
The TRACE method is designed for diagnostic purposes. If enabled, the web server will respond to requests which use the TRACE method by echoing in its response the exact request which was received.
Although this behaviour is apparently harmless in itself, it can sometimes be leveraged to support attacks against other application users. If an attacker can find a way of causing a user to make a TRACE request, and can retrieve the response to that request, then the attacker will be able to capture any sensitive data which is included in the request by the user's browser, for example session cookies or credentials for platform-level authentication. This may exacerbate the impact of other vulnerabilities, such as cross-site scripting.
Issue remediation
The TRACE method should be disabled on the web server.
Unless directed otherwise, browsers may store a local cached copy of content received from web servers. Some browsers, including Internet Explorer, cache content accessed via HTTPS. If sensitive information in application responses is stored in the local cache, then this may be retrieved by other users who have access to the same computer at a future time.
Issue remediation
The application should return caching directives instructing browsers not to store local copies of any sensitive data. Often, this can be achieved by configuring the web server to prevent caching for relevant paths within the web root. Alternatively, most web development platforms allow you to control the server's caching directives from within individual scripts. Ideally, the web server should return the following HTTP headers in all responses containing sensitive content:
The response contains the following Content-type statement:
Content-Type: text/plain; charset=UTF-8
The response states that it contains plain text. However, it actually appears to contain unrecognised content.
Issue background
If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.
In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.
Issue remediation
For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.
The server presented a valid, trusted SSL certificate. This issue is purely informational.
The server presented the following certificates:
Server certificate
Issued to:
portal.realvps.com
Issued by:
GeoTrust DV SSL CA
Valid from:
Tue May 17 16:11:22 GMT-06:00 2011
Valid to:
Sun May 20 07:18:17 GMT-06:00 2012
Certificate chain #1
Issued to:
GeoTrust DV SSL CA
Issued by:
GeoTrust Global CA
Valid from:
Fri Feb 26 15:32:31 GMT-06:00 2010
Valid to:
Tue Feb 25 15:32:31 GMT-06:00 2020
Certificate chain #2
Issued to:
GeoTrust Global CA
Issued by:
Equifax Secure Certificate Authority
Valid from:
Mon May 20 22:00:00 GMT-06:00 2002
Valid to:
Mon Aug 20 22:00:00 GMT-06:00 2018
Certificate chain #3
Issued to:
Equifax Secure Certificate Authority
Issued by:
Equifax Secure Certificate Authority
Valid from:
Sat Aug 22 10:41:51 GMT-06:00 1998
Valid to:
Wed Aug 22 10:41:51 GMT-06:00 2018
Issue background
SSL helps to protect the confidentiality and integrity of information in transit between the browser and server, and to provide authentication of the server's identity. To serve this purpose, the server must present an SSL certificate which is valid for the server's hostname, is issued by a trusted authority and is valid for the current date. If any one of these requirements is not met, SSL connections to the server will not provide the full protection for which SSL is designed.
It should be noted that various attacks exist against SSL in general, and in the context of HTTPS web connections. It may be possible for a determined and suitably-positioned attacker to compromise SSL connections without user detection even when a valid SSL certificate is used.Report generated by XSS.CX at Sat Sep 03 19:50:15 GMT-06:00 2011.