HTTP Header Injection, Location Response Splitting, CWE-113, forums.ebay.com

Report generated by XSS.CX at Tue Sep 27 14:14:00 CDT 2011.



1. HTTP header injection

2. Cross-domain script include



1. HTTP header injection  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://forums.ebay.com
Path:   /db2/forum/Trust-Safety-Safe/107

Issue detail

The value of REST URL parameter 4 is copied into the Location response header. The payload b0bd5%0d%0ad061dbc09a9 was submitted in the REST URL parameter 4. 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 /db2/forum/Trust-Safety-Safe/107b0bd5%0d%0ad061dbc09a9 HTTP/1.1
Host: forums.ebay.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.0 301 Moved Permanently
Server: LiveWorldPlatform/1.3.21
P3P: CP="CAO PSA OUR"
Location: http://forums.ebay.com/db2/forum/Trust-Safety-Safe/107?&rw=trueb0bd5
d061dbc09a9

Content-Type: text/html; charset=UTF-8
Date: Tue, 27 Sep 2011 19:10:38 GMT
Connection: close
Cache-Control: private, must-revalidate, max-age=0, s-maxage=0
Vary: Accept-Encoding


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- null -->
   <title>: eBay Discussion Boards</title>
   <meta http-equiv="content-type" content="text/html; charset
...[SNIP]...

2. Cross-domain script include  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://forums.ebay.com
Path:   /db2/forum/Trust-Safety-Safe/107

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 /db2/forum/Trust-Safety-Safe/107 HTTP/1.1
Host: forums.ebay.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.0 200 OK
Server: LiveWorldPlatform/1.3.21
P3P: CP="CAO PSA OUR"
Content-Type: text/html; charset=UTF-8
Date: Tue, 27 Sep 2011 19:10:36 GMT
Connection: close
Cache-Control: private, must-revalidate, max-age=0, s-maxage=0
Vary: Accept-Encoding


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<!-- template = template-2col -->
<head>
...[SNIP]...
<link rel="stylesheet" type="text/css" href="http://ir.ebaystatic.com/v4css/z/2q/2rckzzycm23iziceetoed5vxx.css"><script src="http://ir.ebaystatic.com/v4js/z/ir/0101uponiy1vhjjvs5pvtkfgy.js"></script><script type="text/javascript" src="http://ir.ebaystatic.com/v4js/z/mv/5fha5wswau2znbfq23itrpv0q.js"></script>
...[SNIP]...
</div><script src="http://include.ebaystatic.com/js/e741/us/ebaybase_v4_e7414us.js"></script><script src="http://include.ebaystatic.com/js/e741/us/ebaysup_e7414us.js"></script>
...[SNIP]...
</script><script src="http://include.ebaystatic.com/js/e741/us/ebayfooter_cobrand_v4_e7414us.js"></script>
...[SNIP]...

Report generated by XSS.CX at Tue Sep 27 14:14:00 CDT 2011.