Report generated by XSS.CX at Fri Nov 12 12:36:59 EST 2010.


Cross Site Scripting Reports | Hoyt LLC Research


Contents

Loading

1. HTTP header injection

2. Cross-domain script include

3. Content type incorrectly stated



1. HTTP header injection  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.redhat.com
Path:   /apps/redirect.apm/http/press.redhat.com

Issue detail

The value of REST URL parameter 3 is copied into the Location response header. The payload 381ad%0d%0a16a458bf924 was submitted in the REST URL parameter 3. This caused a response containing an injected HTTP header.

Issue background

HTTP header injection vulnerabilities arise when user-supplied data is copied into a response header in an unsafe way. If an attacker can inject newline characters into the header, then they can inject new HTTP headers and also, by injecting an empty line, break out of the headers into the message body and write arbitrary content into the application's response.

Various kinds of attack can be delivered via HTTP header injection vulnerabilities. Any attack that can be delivered via cross-site scripting can usually be delivered via header injection, because the attacker can construct a request which causes arbitrary JavaScript to appear within the response body. Further, it is sometimes possible to leverage header injection vulnerabilities to poison the cache of any proxy server via which users access the application. Here, an attacker sends a crafted request which results in a "split" response containing arbitrary content. If the proxy server can be manipulated to associate the injected response with another URL used within the application, then the attacker can perform a "stored" attack against this URL which will compromise other users who request that URL in future.

Issue remediation

If possible, applications should avoid copying user-controllable data into HTTP response headers. If this is unavoidable, then the data should be strictly validated to prevent header injection attacks. In most situations, it will be appropriate to allow only short alphanumeric strings to be copied into headers, and any other input should be rejected. At a minimum, input containing any characters with ASCII codes less than 0x20 should be rejected.

Request

GET /apps/redirect.apm/http381ad%0d%0a16a458bf924/press.redhat.com HTTP/1.1
Host: www.redhat.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; CloudScan Vuln Crawler http://cloudscan.me)
Connection: close

Response

HTTP/1.1 302 Moved Temporarily
Server: Apache
Location: http381ad
16a458bf924
: //press.redhat.com/
Content-Length: 0
Content-Type: text/html; charset=iso-8859-1
Vary: Accept-Encoding
Expires: Fri, 12 Nov 2010 13:33:53 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Fri, 12 Nov 2010 13:33:53 GMT
Connection: close


2. Cross-domain script include  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.redhat.com
Path:   /summit/callforpapers/

Issue detail

The response dynamically includes the following script from another domain:

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 /summit/callforpapers/ HTTP/1.1
Host: www.redhat.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; CloudScan Vuln Crawler http://cloudscan.me)
Connection: close

Response

HTTP/1.1 200 OK
Server: Apache
Content-Type: text/html; charset=UTF-8
Expires: Fri, 12 Nov 2010 13:33:34 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Fri, 12 Nov 2010 13:33:34 GMT
Content-Length: 8272
Connection: close
X-N: S

<!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" lang="en">
<head>
<ti
...[SNIP]...
<link rel="stylesheet" type="text/css" media="screen, projection" href="/summit/css/nivo-slider.css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
...[SNIP]...

3. Content type incorrectly stated  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.redhat.com
Path:   /robots.txt

Issue detail

The response contains the following Content-type statement:The response states that it contains plain text. However, it actually appears to contain script.

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 /robots.txt HTTP/1.1
Host: www.redhat.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; CloudScan Vuln Crawler http://cloudscan.me)
Connection: close

Response

HTTP/1.1 200 OK
Server: Apache
Last-Modified: Fri, 11 Jun 2010 14:57:27 GMT
ETag: "65badf-16f-488c25b8023c0"
Accept-Ranges: bytes
Content-Length: 367
Content-Type: text/plain; charset=UTF-8
Date: Fri, 12 Nov 2010 12:59:10 GMT
Connection: close

User-agent: *
Disallow: /apps/download/results.html
Disallow: /apps/search/results.html
Disallow: /apps/user/
Disallow: /apps/user/*
Disallow: /WebX/*
Disallow: /webx/*
Disallow: /WebX/*
Disallow: /te
...[SNIP]...

Report generated by XSS.CX at Fri Nov 12 12:36:59 EST 2010.