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.
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.
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.
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
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
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.
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.
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
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
The response contains the following Content-type statement:
Content-Type: text/plain; charset=UTF-8
The response states that it contains plain text. However, it actually appears to contain script.
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.
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.
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
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