XSS, Cross Site Scripting, taxes.hrblock.com, CWE-79, DORK

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

Report generated by CloudScan Vulnerability Crawler at Mon Feb 14 10:11:18 CST 2011.


The DORK Report

Loading

1. Cross-site scripting (reflected)

2. Cacheable HTTPS response

2.1. https://taxes.hrblock.com/hrblock/login/ForgotAccountInfo.hrbx

2.2. https://taxes.hrblock.com/hrblock/login/LoginRegistration.hrbx

3. SSL certificate



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://taxes.hrblock.com
Path:   /hrblock/login/ForgotAccountInfo.hrbx

Issue detail

The name of an arbitrarily supplied request parameter is copied into a JavaScript rest-of-line comment. The payload 46f3a</script><script>alert(1)</script>34df3b750ec was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.

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

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.

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.

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: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.

Request

GET /hrblock/login/ForgotAccountInfo.hrbx?46f3a</script><script>alert(1)</script>34df3b750ec=1 HTTP/1.1
Host: taxes.hrblock.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
Cache-Control: private
Content-Type: text/html; charset=utf-8
Expires: Fri, 01 Jan 1700 06:00:00 GMT
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Sat, 12 Feb 2011 18:35:17 GMT
Connection: close
Content-Length: 2162

<script language='JavaScript' id='LoadScript'>//p=new X.Page({Title:"Forgot Account Information",RequiresSession:false,Buttons:[new X.NavigationButton({Type:"B"},[]),new X.NavigationButton({Type:"N"},
...[SNIP]...
faultTextBlockStyle"},[new X.Run({Text:" Both my username and password "},[])])])]),new X.TextBlock({Style:"DefaultTextBlockStyle"},[new X.HiddenField({Name:"ReqQueryString",Id:"ReqQueryString",Value:"46f3a</script><script>alert(1)</script>34df3b750ec=1"},[])]),new X.RefundOweMeter({},[new X.FederalRefundItem({Amount:"0"},["Refund"])])])</script>
...[SNIP]...

2. Cacheable HTTPS response  previous  next
There are 2 instances of this issue:

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:


2.1. https://taxes.hrblock.com/hrblock/login/ForgotAccountInfo.hrbx  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://taxes.hrblock.com
Path:   /hrblock/login/ForgotAccountInfo.hrbx

Request

GET /hrblock/login/ForgotAccountInfo.hrbx HTTP/1.1
Host: taxes.hrblock.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
Cache-Control: private
Content-Type: text/html; charset=utf-8
Expires: Fri, 01 Jan 1700 06:00:00 GMT
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Sat, 12 Feb 2011 18:35:05 GMT
Connection: close
Content-Length: 2031

<script language='JavaScript' id='LoadScript'>//p=new X.Page({Title:"Forgot Account Information",RequiresSession:false,Buttons:[new X.NavigationButton({Type:"B"},[]),new X.NavigationButton({Type:"N"},
...[SNIP]...

2.2. https://taxes.hrblock.com/hrblock/login/LoginRegistration.hrbx  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   https://taxes.hrblock.com
Path:   /hrblock/login/LoginRegistration.hrbx

Request

GET /hrblock/login/LoginRegistration.hrbx HTTP/1.1
Host: taxes.hrblock.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
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Sat, 12 Feb 2011 18:36:17 GMT
Connection: close
Content-Length: 246

<script>var path = window.location.href; path = path.replace(/(&)?FV=.|(&)?HT=./ig, ''); document.cookie = 'CurrentPage='+path+';RC=F;'; path += (window.location.search != '' ? '&FV=F&HT=F' : '?FV=F&H
...[SNIP]...

3. SSL certificate  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   https://taxes.hrblock.com
Path:   /

Issue detail

The server presented a valid, trusted SSL certificate. This issue is purely informational.

The server presented the following certificates:

Server certificate

Issued to:  taxes.hrblock.com
Issued by:  VeriSign Class 3 Extended Validation SSL SGC CA
Valid from:  Mon Aug 09 19:00:00 CDT 2010
Valid to:  Wed Aug 10 18:59:59 CDT 2011

Certificate chain #1

Issued to:  VeriSign Class 3 Extended Validation SSL SGC CA
Issued by:  VeriSign Class 3 Public Primary Certification Authority - G5
Valid from:  Tue Nov 07 18:00:00 CST 2006
Valid to:  Mon Nov 07 17:59:59 CST 2016

Certificate chain #2

Issued to:  VeriSign Class 3 Public Primary Certification Authority - G5
Issued by:  Class 3 Public Primary Certification Authority
Valid from:  Tue Nov 07 18:00:00 CST 2006
Valid to:  Sun Nov 07 17:59:59 CST 2021

Certificate chain #3

Issued to:  Class 3 Public Primary Certification Authority
Issued by:  Class 3 Public Primary Certification Authority
Valid from:  Sun Jan 28 18:00:00 CST 1996
Valid to:  Wed Aug 02 18:59:59 CDT 2028

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 CloudScan Vulnerability Crawler at Mon Feb 14 10:11:18 CST 2011.