The name of an arbitrarily supplied request parameter is copied into an HTML comment. The payload bbdaf--><script>alert(1)</script>072edfc292f was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.
Echoing user-controllable data within HTML comment tags does not prevent XSS attacks if the user is able to close the comment or use other techniques to introduce scripts within the comment context.
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.
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.
GET /store/bobjamer/DisplayHomePage/Locale.en_US/Currency.USD/pgm.53404400?resid=TO7NCgoBAlUAADOMKwgAAAAG&rests=1290718472838&bbdaf--><script>alert(1)</script>072edfc292f=1 HTTP/1.1 Host: store.businessobjects.com Proxy-Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.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: ORA_WX_SESSION="10.1.2.214:772-0#0"; JSESSIONID=2530CAA98DFB9391718FB6373C6B0932; VISITOR_ID=971D4E8DFAED436776B8BC5062DC968A0B5A0D2D5C37A61E; bobjamer.pgm=53404400; BIGipServerp-drh-dc1pod8-pool2-active=3590455562.772.0000
HTTP/1.1 200 OK Pragma: no-cache Expires: Wed, 31 Dec 1969 23:59:59 GMT Content-Type: text/html;charset=UTF-8 Cache-Control: max-age=0 Server: Oracle Application Server/10g (10.1.2) Apache OracleAS-Web-Cache-10g/10.1.2.0.2 (TN;ecid=67566869076,0) Date: Thu, 25 Nov 2010 21:20:38 GMT P3P: policyref="/w3c/p3p.xml", CP="CAO DSP TAIa OUR IND UNI PUR COM NAV CNT STA PRE" X-Server-Name: gcweb03@dc1app82 Content-Length: 43390
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xml:lang="en" lang="en"> <head> <!--!esi:include src="/esi?Sit ...[SNIP]... <!--!esi:include src="/store?Action=DisplayESIPage&Currency=USD&ESIHC=cb27670a&Env=BASE&Locale=en_US&SiteID=bobjamer&StyleID=2002500&StyleVersion=86&bbdaf--><script>alert(1)</script>072edfc292f=1&ceid=164842800&cename=TopHeader&id=HomePage&script> ...[SNIP]...
2. Cross-domain script includepreviousnext There are 2 instances of this issue:
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.
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.
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
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.
GET /store/bobjamer/en_US/sitemap HTTP/1.1 Host: store.businessobjects.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: extcmp=null; JSESSIONID=2530CAA98DFB9391718FB6373C6B0932; s_sess=%20s_cc%3Dtrue%3B%20v18%3D6%3B%20s_sq%3D%3B; bobjamer.pgm=53404400; fcR=X; VISITOR_ID=971D4E8DFAED436776B8BC5062DC968A0B5A0D2D5C37A61E; ORA_WX_SESSION="10.1.2.214:772-0#0"; fcP=C=0&T=1290718461692&DTO=1290718461007&U=1763882371&V=1290720824025; mbox=session#1290718463688-414860#1290722685|PC#1290718463688-414860.18#1291930425|check#true#1290720885; style=null; s_pers=%20v14%3D%255B%255B%2527Typed/Bookmarked%2527%252C%25271290718464192%2527%255D%252C%255B%2527link%25257Cburp%2527%252C%25271290720824654%2527%255D%255D%7C1448487224654%3B%20c13%3Destores%253Aus%253Ahomepage%7C1290722624657%3B%20pe%3Dno%2520value%7C1290722624660%3B%20c3%3Dno%2520value%7C1290722624664%3B%20s_nr%3D1290720824676-New%7C1293312824676%3B%20s_visit%3D1%7C1290722624680%3B%20gpv_p47%3Dno%2520value%7C1290722624684%3B; fcC=X=C1763882371&Y=1290720824940&FV=10&H=1290720824025&fcTHR=store.businessobjects.com}www.businessobjects.com&Z=4&I=1290720337358; fcPT=http%3A//store.businessobjects.com/store/bobjamer/DisplayHomePage/Locale.en_US/Currency.USD/pgm.53404400%3Fresid%3DTO7NCgoBAlUAADOMKwgAAAAG%26rests%3D1290718472838%26bbdaf--%253E%253Cscript%253Ealert%28%252564%25256F%252563%252575%25256D%252565%25256E%252574%25252E%252563%25256F%25256F%25256B%252569%252565%29%253C/script%253E072edfc292f%3D1; BIGipServerp-drh-dc1pod8-pool2-active=3590455562.772.0000;
HTTP/1.1 200 OK Pragma: no-cache Expires: Wed, 31 Dec 1969 23:59:59 GMT Content-Type: text/html;charset=UTF-8 Set-Cookie: VISITOR_ID=971D4E8DFAED436776B8BC5062DC968A0B5A0D2D5C37A61E; expires=Sat, 26-Nov-2011 04:10:36 GMT; path=/ Cache-Control: max-age=0 Server: Oracle Application Server/10g (10.1.2) Apache OracleAS-Web-Cache-10g/10.1.2.0.2 (TN;ecid=144879913495,0) Content-Length: 140934 Date: Thu, 25 Nov 2010 22:19:46 GMT P3P: policyref="/w3c/p3p.xml", CP="CAO DSP TAIa OUR IND UNI PUR COM NAV CNT STA PRE" X-Server-Name: gcweb03@dc1app82 Connection: close
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xml:lang="en" lang="en"> <head> <!--!esi:include src="/esi?Sit ...[SNIP]...
4. Email addresses disclosedprevious There are 2 instances of this issue:
The presence of email addresses within application responses does not necessarily constitute a security vulnerability. Email addresses may appear intentionally within contact information, and many applications (such as web mail) include arbitrary third-party email addresses within their core content.
However, email addresses of developers and other individuals (whether appearing on-screen or hidden within page source) may disclose information that is useful to an attacker; for example, they may represent usernames that can be used at the application's login, and they may be used in social engineering attacks against the organisation's personnel. Unnecessary or excessive disclosure of email addresses may also lead to an increase in the volume of spam email received.
You should review the email addresses being disclosed by the application, and consider removing any that are unnecessary, or replacing personal addresses with anonymous mailbox addresses (such as firstname.lastname@example.org).