XSS, Travelzoo.com, DORK, 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 Thu Mar 17 10:45:17 CDT 2011.


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

XSS.CX Home XSS.CX Research Blog
Loading

1. Cross-site scripting (reflected)

2. Cookie scoped to parent domain

3. Cross-domain script include

3.1. http://www.travelzoo.com/

3.2. http://www.travelzoo.com/local-deals/

4. Email addresses disclosed



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.travelzoo.com
Path:   /

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 7029e"style%3d"x%3aexpression(alert(1))"e95ffc19077 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 7029e"style="x:expression(alert(1))"e95ffc19077 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 arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

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.

Request

GET /?7029e"style%3d"x%3aexpression(alert(1))"e95ffc19077=1 HTTP/1.1
Host: www.travelzoo.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
X-IP: 70
X-AspNet-Version: 2.0.50727
Content-Language: en-US
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Expires: Wed, 16 Mar 2011 13:33:02 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 16 Mar 2011 13:33:02 GMT
Connection: close
Content-Length: 85831


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Travel Deals: Airfare, Hotels, Vacations, Cruises | Travelzoo<
...[SNIP]...
<link rel="canonical" href="http://www.travelzoo.com/?7029e"style="x:expression(alert(1))"e95ffc19077=1">
...[SNIP]...

2. Cookie scoped to parent domain  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.travelzoo.com
Path:   /local-deals/

Issue detail

The following cookie was issued by the application and is scoped to a parent of the issuing domain: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

A cookie's domain attribute determines which domains can access the cookie. Browsers will automatically submit the cookie in requests to in-scope domains, and those domains will also be able to access the cookie via JavaScript. If a cookie is scoped to a parent domain, then that cookie will be accessible by the parent domain and also by any other subdomains of the parent domain. If the cookie contains sensitive data (such as a session token) then this data may be accessible by less trusted or less secure applications residing at those domains, leading to a security compromise.

Issue remediation

By default, cookies are scoped to the issuing domain and all subdomains. If you remove the explicit domain attribute from your Set-cookie directive, then the cookie will have this default scope, which is safe and appropriate in most situations. If you particularly need a cookie to be accessible by a parent domain, then you should thoroughly review the security of the applications residing on that domain and its subdomains, and confirm that you are willing to trust the people and systems which support those applications.

Request

GET /local-deals/ HTTP/1.1
Host: www.travelzoo.com
Proxy-Connection: keep-alive
Referer: http://www.travelzoo.com/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: __utmz=82263945.1300282372.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmv=; __utma=82263945.1637931389.1300282372.1300282372.1300282372.1; __utmc=82263945; __utmb=82263945.1.10.1300282372

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
X-IP: 110
X-AspNet-Version: 2.0.50727
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Expires: Wed, 16 Mar 2011 13:50:01 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 16 Mar 2011 13:50:01 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ASP.NET_SessionId=egw4vn55w33x5y55mflrsx25; domain=.travelzoo.com; path=/; HttpOnly
Content-Length: 282516

...

<!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" xml:lang="en" lang="en">
<head id="ctl
...[SNIP]...

3. Cross-domain script include  previous  next
There are 2 instances of this issue:

Issue background

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.


3.1. http://www.travelzoo.com/  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.travelzoo.com
Path:   /

Issue detail

The response dynamically includes the following scripts from other domains:

Request

GET / HTTP/1.1
Host: www.travelzoo.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
X-IP: 70
X-AspNet-Version: 2.0.50727
Content-Language: en-US
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Expires: Wed, 16 Mar 2011 13:32:59 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 16 Mar 2011 13:32:59 GMT
Connection: close
Content-Length: 85785


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Travel Deals: Airfare, Hotels, Vacations, Cruises | Travelzoo<
...[SNIP]...
<![endif]-->

<script src="http://www.tzoo-img.com/static/jquery/jquery.min.js?PNZH0ZHE" type="text/javascript"></script>
<script src="http://www.tzoo-img.com/static/jquery/jquery.jcarousel.pack.js?PNZH0ZHE" type="text/javascript"></script>
<script src="http://www.tzoo-img.com/static/jquery/jquery-ui.custom.min.js?PNZH0ZHE" type="text/javascript"></script>
<script src="http://www.tzoo-img.com/static/jquery/jquery.cookie.js?PNZH0ZHE" type="text/javascript"></script>
<script src="http://www.tzoo-img.com/static/jquery/autocomplete/jquery.autocomplete.js?PNZH0ZHE" type="text/javascript"></script>
<script src="http://www.tzoo-img.com/static/geodataautocomplete.js?PNZH0ZHE" type="text/javascript"></script>
<script src="http://www.tzoo-img.com/static/newdateutil.js?PNZH0ZHE" type="text/javascript"></script>
<script src="http://www.tzoo-img.com/static/header.js?PNZH0ZHE" type="text/javascript"></script>
...[SNIP]...
</div>

           <script type="text/javascript" src="http://www.tzoo-img.com/static/JScript.js?PNZH0ZHE"></script>
        <script type="text/javascript" src="http://www.tzoo-img.com/static/jsNewSubscriptionUtility2.js?PNZH0ZHE"></script>
        <script type="text/javascript" src="http://www.tzoo-img.com/static/jsValidationUtilityUK.aspx?PNZH0ZHE"></script>
        <script type="text/javascript" src="http://www.tzoo-img.com/static/jsVisualUtility.js?PNZH0ZHE"></script>
...[SNIP]...

3.2. http://www.travelzoo.com/local-deals/  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.travelzoo.com
Path:   /local-deals/

Issue detail

The response dynamically includes the following scripts from other domains:

Request

GET /local-deals/ HTTP/1.1
Host: www.travelzoo.com
Proxy-Connection: keep-alive
Referer: http://www.travelzoo.com/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: __utmz=82263945.1300282372.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmv=; __utma=82263945.1637931389.1300282372.1300282372.1300282372.1; __utmc=82263945; __utmb=82263945.1.10.1300282372

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
X-IP: 110
X-AspNet-Version: 2.0.50727
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Expires: Wed, 16 Mar 2011 13:50:01 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 16 Mar 2011 13:50:01 GMT
Connection: close
Connection: Transfer-Encoding
Set-Cookie: ASP.NET_SessionId=egw4vn55w33x5y55mflrsx25; domain=.travelzoo.com; path=/; HttpOnly
Content-Length: 282516

...

<!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" xml:lang="en" lang="en">
<head id="ctl
...[SNIP]...
<link href="http://www.travelzoo.com/local-deals/img/favicon.ico" rel="shortcut icon" type="image/x-icon"><script type="text/javascript" src="http://www.tzoo-img.com/static/jquery/jquery.min.js?PNZDGDPF"></script><script type="text/javascript" src="http://www.tzoo-img.com/static/jquery/jquery-ui.custom.min.js?PNZDGDPF"></script>
...[SNIP]...
</div>

<script src="http://www.tzoo-img.com/static/header.js?PNZDGDPF" type="text/javascript"></script>
...[SNIP]...

4. Email addresses disclosed  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.travelzoo.com
Path:   /

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 / HTTP/1.1
Host: www.travelzoo.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
X-IP: 70
X-AspNet-Version: 2.0.50727
Content-Language: en-US
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Expires: Wed, 16 Mar 2011 13:32:59 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 16 Mar 2011 13:32:59 GMT
Connection: close
Content-Length: 85785


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Travel Deals: Airfare, Hotels, Vacations, Cruises | Travelzoo<
...[SNIP]...
<br>Please add top20deals@email.travelzoo.com to your address book or contacts list, so your Top 20 won't end up in the spam folder.
       
       </div>
...[SNIP]...

Report generated by XSS.CX at Thu Mar 17 10:45:17 CDT 2011.