Stored cross-site scripting vulnerabilities arise when data which originated from any tainted source is copied into the application's responses in an unsafe way.
The value of the url request parameter submitted to the URL /_layouts/SavvisUtilities/BreadCrumb.aspx is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks at the URL /_layouts/SavvisUtilities/BreadCrumb.aspx. The payload 13414"><script>alert(1)</script>9393b8fc187 was submitted in the url parameter. This input was returned unmodified in a subsequent request for the URL /_layouts/SavvisUtilities/BreadCrumb.aspx.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Issue background
Stored cross-site scripting vulnerabilities arise when data which originated from any tainted source is copied into the application's responses in an unsafe way. An attacker can use the vulnerability to inject malicious JavaScript code into the application, which will execute within the browser of any user who views the relevant application content.
The attacker-supplied code can perform a wide variety of actions, such as stealing victims' session tokens or login credentials, performing arbitrary actions on their behalf, and logging their keystrokes.
Methods for introducing malicious content include any function where request parameters or headers are processed and stored by the application, and any out-of-band channel whereby data can be introduced into the application's processing space (for example, email messages sent over SMTP which are ultimately rendered within a web mail application).
Stored cross-site scripting flaws are typically more serious than reflected vulnerabilities because they do not require a separate delivery mechanism in order to reach targe users, and they can potentially be exploited to create web application worms which spread exponentially amongst application users.
Note that automated detection of stored cross-site scripting vulnerabilities cannot reliably determine whether attacks that are persisted within the application can be accessed by any other user, only by authenticated users, or only by the attacker themselves. You should review the functionality in which the vulnerability appears to determine whether the application's behaviour can feasibly be used to compromise other application users.
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 defences:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.
Request 1
GET /_layouts/SavvisUtilities/BreadCrumb.aspx?text=Contact%20Us&url=13414"><script>alert(1)</script>9393b8fc187 HTTP/1.1 Host: www.savvis.com Proxy-Connection: keep-alive Referer: http://www.savvis.com/en-US/Contacts/Pages/Home.aspx X-Requested-With: XMLHttpRequest Accept: text/html, */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ASP.NET_SessionId=v4ogkqaqnxabmhavqq3hfh55; ISAWPLB{D019C4BA-90BB-4640-8350-292563A5F97F}={34118E4A-FE50-4D71-BFA9-8A541F4A5C1A}
Request 2
GET /_layouts/SavvisUtilities/BreadCrumb.aspx?text=Contact%20Us&url=http%3A//www.savvis.com/en-US/Contacts/Pages/Home.aspx HTTP/1.1 Host: www.savvis.com Proxy-Connection: keep-alive Referer: http://www.savvis.com/en-US/Contacts/Pages/Home.aspx X-Requested-With: XMLHttpRequest Accept: text/html, */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ASP.NET_SessionId=v4ogkqaqnxabmhavqq3hfh55; ISAWPLB{D019C4BA-90BB-4640-8350-292563A5F97F}={34118E4A-FE50-4D71-BFA9-8A541F4A5C1A}
Response 2
HTTP/1.1 200 OK Connection: Keep-Alive Expires: Sat, 05 Mar 2011 00:19:41 GMT Date: Sat, 05 Mar 2011 00:20:41 GMT Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6211 X-Server: EW05 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Vary: Accept-Encoding Content-Length: 455
The value of the text request parameter is copied into the HTML document as plain text between tags. The payload 9897f<script>alert(1)</script>29e80fc9d2a was submitted in the text 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.
Issue background
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 defences:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.
Request
GET /_layouts/SavvisUtilities/BreadCrumb.aspx?text=Solutions9897f<script>alert(1)</script>29e80fc9d2a&url=http%3A//www.savvis.com/en-US/Solutions/Pages/Home.aspx HTTP/1.1 Host: www.savvis.com Proxy-Connection: keep-alive Referer: http://www.savvis.com/en-US/Solutions/Pages/Home.aspx X-Requested-With: XMLHttpRequest Accept: text/html, */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ISAWPLB{D019C4BA-90BB-4640-8350-292563A5F97F}={1FC03E2D-326E-46F6-8507-C25AD0B14C44}
<p id="breadcrumb">Previously Viewed Pages<br/><span>Path to this content : </span><a href="/" title="Home">Home</a> / Solutions9897f<script>alert(1)</script>29e80fc9d2a</p>
Savvis Stored BreadCrumb #1
Savvis Stored BreadCrumb #2
Savvis Stored BreadCrumb Final Result :->
3. Email addresses disclosedprevious There are 7 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.
Issue remediation
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 helpdesk@example.com).
The following email address was disclosed in the response:
brandon.aaron@gmail.com
Request
GET /assets/scripts/js/jquery.bgiframe.js HTTP/1.1 Host: www.savvis.com Proxy-Connection: keep-alive Referer: http://www.savvis.com/en-US/Pages/Home.aspx Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ISAWPLB{D019C4BA-90BB-4640-8350-292563A5F97F}={1FC03E2D-326E-46F6-8507-C25AD0B14C44}
Response
HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 4825 Date: Fri, 04 Mar 2011 02:13:34 GMT Content-Type: application/x-javascript ETag: "{1AFB43C9-11D7-4D1C-AE61-1738FEC907D8},435" Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6211 X-Server: EW06 X-Powered-By: ASP.NET Last-Modified: Wed, 16 Feb 2011 05:01:32 GMT ResourceTag: rt:1AFB43C9-11D7-4D1C-AE61-1738FEC907D8@00000000435 Exires: Thu, 17 Feb 2011 02:13:34 GMT Cache-Control: private,max-age=0 Public-Extension: http://schemas.microsoft.com/repl-2
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-li ...[SNIP]... ided so that one could change * the src of the iframe to whatever they need. * Default: "javascript:false;" * * @name bgiframe * @type jQuery * @cat Plugins/bgiframe * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) */ $.fn.bgIframe = $.fn.bgiframe = function(s) { // This is only for IE6 if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) { s = $.extend({ top : 'auto', ...[SNIP]...
The following email addresses were disclosed in the response:
brandon.aaron@gmail.com
paul.bakaus@googlemail.com
Request
GET /assets/scripts/js/jquery.dimensions.js HTTP/1.1 Host: www.savvis.com Proxy-Connection: keep-alive Referer: http://www.savvis.com/en-US/Pages/Home.aspx Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ISAWPLB{D019C4BA-90BB-4640-8350-292563A5F97F}={1FC03E2D-326E-46F6-8507-C25AD0B14C44}
Response
HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 3523 Date: Fri, 04 Mar 2011 02:13:34 GMT Content-Type: application/x-javascript ETag: "{9F9A09C1-C51B-4F8B-8799-53D3DCA841D8},434" Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6211 X-Server: EW06 X-Powered-By: ASP.NET Last-Modified: Wed, 16 Feb 2011 05:01:32 GMT ResourceTag: rt:9F9A09C1-C51B-4F8B-8799-53D3DCA841D8@00000000434 Exires: Thu, 17 Feb 2011 02:13:34 GMT Cache-Control: private,max-age=0 Public-Extension: http://schemas.microsoft.com/repl-2
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * $LastCha ...[SNIP]...
The following email address was disclosed in the response:
mjijackson@gmail.com
Request
GET /assets/shadowbox/shadowbox.js HTTP/1.1 Host: www.savvis.com Proxy-Connection: keep-alive Referer: http://www.savvis.com/en-US/Pages/Home.aspx Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ISAWPLB{D019C4BA-90BB-4640-8350-292563A5F97F}={1FC03E2D-326E-46F6-8507-C25AD0B14C44}
Response
HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 71504 Date: Fri, 04 Mar 2011 02:13:35 GMT Content-Type: application/x-javascript ETag: "{1B575407-C135-4468-8137-DC2EBF8A20AB},432" Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6211 X-Server: EW06 X-Powered-By: ASP.NET Last-Modified: Wed, 16 Feb 2011 05:01:32 GMT ResourceTag: rt:1B575407-C135-4468-8137-DC2EBF8A20AB@00000000432 Exires: Thu, 17 Feb 2011 02:13:35 GMT Cache-Control: private,max-age=0 Public-Extension: http://schemas.microsoft.com/repl-2
/** * The Shadowbox class. * * This file is part of Shadowbox. * * Shadowbox is an online media viewer application that supports all of the * web's most popular media publishing formats. Shadowb ...[SNIP]... <mjijackson@gmail.com> ...[SNIP]... <mjijackson@gmail.com> ...[SNIP]...
/** * The "classic" theme CSS for Shadowbox. * * This file is part of Shadowbox. * * Shadowbox is an online media viewer application that supports all of the * web's most popular media publishin ...[SNIP]... <mjijackson@gmail.com> ...[SNIP]...
The following email address was disclosed in the response:
mjijackson@gmail.com
Request
GET /assets/shadowbox/skin/classic/skin.js HTTP/1.1 Host: www.savvis.com Proxy-Connection: keep-alive Referer: http://www.savvis.com/en-US/Pages/Home.aspx Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ISAWPLB{D019C4BA-90BB-4640-8350-292563A5F97F}={1FC03E2D-326E-46F6-8507-C25AD0B14C44}
Response
HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 3495 Date: Fri, 04 Mar 2011 02:13:37 GMT Content-Type: application/x-javascript ETag: "{CA7A4A56-1FE0-4AA6-A1DD-3A15F59DA178},428" Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6211 X-Server: EW06 X-Powered-By: ASP.NET Last-Modified: Fri, 31 Dec 2010 01:38:07 GMT ResourceTag: rt:CA7A4A56-1FE0-4AA6-A1DD-3A15F59DA178@00000000428 Exires: Thu, 17 Feb 2011 02:13:37 GMT Cache-Control: private,max-age=0 Public-Extension: http://schemas.microsoft.com/repl-2
/** * The "classic" theme markup for Shadowbox. * * This file is part of Shadowbox. * * Shadowbox is an online media viewer application that supports all of the * web's most popular media publis ...[SNIP]... <mjijackson@gmail.com> ...[SNIP]...