| Subject: | Re: [LimeBits 172] Re: Displaying untrusted content |
|---|---|
| Date: | Wed, 11 Mar 2009 02:00:00 -0700 |
| From: | Dean Brettle <de...@brettle.com> |
| To: | jmar...@limebits.com |
Thanks, Dean. LimeBits is a platform for developing, hosting, and sharing full-functioning javascript. We try to avoid impairing or subsetting javascript.
Our notion of a sandbox is a subdomain isolated from the user's sensitive information (plus some other protections). Because the subdomain is isolated, scripts running in (a page loaded from) that same subdomain are not dangerous.
NeatHtml might be of interest to developers using the LimeBits platform, if their sites display untrusted content. But NeatHtml requires server-side processing, which LimeBits does not now support.
| Subject: | Re: [LimeBits 172] Re: Displaying untrusted content |
|---|
| Date: | Tue, 17 Mar 2009 19:36:00 -0400 |
|---|---|
| From: | Jonathan A. Marshall <jmar...@limebits.com> |
| To: | Dean Brettle <de...@brettle.com> |
> They are not dangerous to other subdomains, but they are dangerous to the subdomain in which they run
> I think this vulnerability can be fixed by changing the Content-Type that the server uses when serving untrusted resources.
> If the untrusted content is already separated by being a separate resource and javascript is already required (as with limebits), no server-side processing would be needed. NeatHtml's FilterTagSoupToXml() javascript method takes an untrusted string and returns sanitized well-formed XHTML. Currently FilterTagSoupToXml() isn't publicly exposed, but that would be extremely easy to change.
Hi Jonathan,
[I'm replying off-list because this message discusses potential limebits security vulnerabilities. If you'd rather continue the conversation on the list, feel free to repost this there. I'm not sure what your policy for vulnerability reports is so I'm playing it safe...]
| Subject: | Re: [LimeBits 172] Re: Displaying untrusted content |
|---|
| Date: | Fri, 20 Mar 2009 16:32:36 -0700 |
|---|---|
| From: | Dean Brettle <de...@brettle.com> |
| To: | Jonathan A. Marshall <jmar...@limebits.com> |
[Looks like you forgot to cc the forum. I'm continuing in private because you might want to avoid disclosure until at least the "comments" vulnerability is fixed by serving untrusted content with a different content type.]
Regarding sandboxing modules in subdomains until the site developer trusts them, I think that is a nice feature but isn't critical. I run all sorts of open source software on my computer without personally examining it first. I trust it because it is open source and I trust the distributor, the developers, or others who have recommended it. Similarly, I'd find some sort of rating system or developer reputation/identification system for LimeBits more useful than sandboxing modules in subdomains.
I'm far more concerned about XSS attacks in untrusted content. LimeBits javascript+WebDAV architecture makes it especially vulnerable because all untrusted content must be available via an URL in the domain of the app that will use it. So I urge you to fix that (e.g. by changing the content-type) as quickly as you can.
As for use cases for FilterTagSoupToXml(), they are exactly what you describe -- any situation where the user would like to add rich content instead of plain text. This could be in blog comments, forum posts, reviews, scrapbooks, wiki-style systems, etc. I haven't looked at the LimeBits API in any detail but it might be useful to provide methods for retrieving untrusted HTML and untrusted plain text. The former could sanitize it using something like FilterTagSoupToXml() and the latter could sanitize by HTML-encoding the special chars.
--Dean
On Mar 17, 2009 4:36 PM, "Jonathan A. Marshall" <jmar...@limebits.com> wrote:
Thanks, Dean. I appreciate your input and insights.
We're trying to be as open as possible, so I'm CC'ing the LimeBits forum.
> > They are not dangerous to other subdomains, but they are dangerous to the subdomain in which t...
Correct. The key is to have multiple subdomains, so that mischief in one doesn't hurt another. For example, if I copy code into newapp.jam.limebits.com and load it from that subdomain, LimeBits sandboxing will isolate it from www.jam.limebits.com.
Later, if I decide that I trust the code (after suitable examination), I can load it as www.jam.limebits.com/newapp -- which confers access to the contents of that subdomain.
We are working on the sandboxing and hope to finish it in a few months.
> > I think this vulnerability can be fixed by changing the Content-Type that the server uses when...
Great idea. We'll discuss implementing that.
> > If the untrusted content is already separated by being a separate resource and javascript is a...
OK, then this is definitely useful for apps that want to sanitize yet still allow some code in the input. If the developer doesn't want simply to escape all code trigger characters (like converting < and > to < and >) then FilterTagSoupToXml() would be handy.
Can you explain more about the use cases where FilterTagSoupToXml() would be preferred over a simpler escape conversion?
Best wishes,
--Jonathan
Dean Brettle wrote:
> > Hi Jonathan, > > [I'm replying off-list because this message discusses potential limebits secur...
On Mon, Mar 9, 2009 at 8:00 AM, Jonathan A. Marshall wrote:
>> >> Thanks, Dean. LimeBits is a platform for developing, hosting, and sharing full-functioning j...