<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Shutting Down XSS with Content Security Policy</title>
	<atom:link href="http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/</link>
	<description></description>
	<lastBuildDate>Thu, 19 Nov 2009 15:36:11 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: austin cheney</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-106808</link>
		<dc:creator>austin cheney</dc:creator>
		<pubDate>Tue, 11 Aug 2009 06:10:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-106808</guid>
		<description>From a technology perspective this is an elegant solution for two reasons.

1) It will mostly cure XSS.  I have been telling people for months that mitigation is not a solution.

2) It forces JavaScript off the damn page.  This is something HTML should have fixed years ago.  In page JavaScript has been a horrible culprit in namespace collisions that can occur from third-party ads that crash your own native code.


I have noticed four problems that may cause this proposition to fail:

1) Advertising business interference
Unfortunately this solution is horribly flawed from a business perspective.  Business on the web is extremely reliant upon advertisements whose metrics are tracked by execution of client-side script supplied by those ads.  It seems this solution will also eliminate this revenue stream.  I expect this to meet some serious criticism.

2) Not a standard
I see no indication that this venture is representative of any sort of standard.  Security is a universal problem that demands a universal solution.  A Firefox favoring proprietary solution will certainly benefit Firefox as a product and reposition it in the grab for market share, but it will not fix the problem.  I strongly recommend that this action be written as an internet draft and submitted to the IETF as an extension of URI/HTTP.

3) No client-side control mechanism
The root of the problem is that malicious software written by a stranger is executing at will at the user-agent.  This solution provides a mechanism for the site to inform the browser of the approved script repository where that script only is then executed in accordance with the status quo.  That mechanism will likely occur as an HTTP header to provide transparency to the user.  Unfortunately this still does not provide any control to the user of which code should or should not execute.  If malicious code is living in the blessed repository then nothing is gained and attacks continue without the user&#039;s knowledge.  A user must be able to make decisions about what is executing on their own software on their own machine or the problem is merely diminished instead of solved.

4) Relay points
There is no indication that scripts cannot point to a reference outside the blessed sandbox, which opens possibilities of attack from a couple different angles.  If script uses the XMLHttpRequest object to point to a location outside the blessed sandbox for additional instructions then nothing is gained by this mechanism.  The mere opening of such a connection could be a point of exploitation if the code or data being retrieved is entirely benign.  Again, there must be notifications provided to the user before code executes locally without prior discriminatory user consent.

You guys have my full support on this endeavor as drastic steps must be taken to solve this problem.  There are more XSS vulnerabilities reported than all other computer security vulnerabilities combined and doubled.  If this problem is not solved by any means necessary commerce on the web will fail, and the web itself will fail.

Before becoming aware of this work I posted a solution of migrating script execution to email using a secure mechanism.  The proposal is completely sound from both a technology and security perspective, but is so far extremely unpopular for eliminating execution of events.  Since this alternate solution is based off a more complex transmission mechanism it may or may not be helpful.  I hope that may be able to provide any additional guidance that may not have been previously considered.
http://www.ietf.org/id/draft-cheney-safe-04.txt</description>
		<content:encoded><![CDATA[<p>From a technology perspective this is an elegant solution for two reasons.</p>
<p>1) It will mostly cure XSS.  I have been telling people for months that mitigation is not a solution.</p>
<p>2) It forces JavaScript off the damn page.  This is something HTML should have fixed years ago.  In page JavaScript has been a horrible culprit in namespace collisions that can occur from third-party ads that crash your own native code.</p>
<p>I have noticed four problems that may cause this proposition to fail:</p>
<p>1) Advertising business interference<br />
Unfortunately this solution is horribly flawed from a business perspective.  Business on the web is extremely reliant upon advertisements whose metrics are tracked by execution of client-side script supplied by those ads.  It seems this solution will also eliminate this revenue stream.  I expect this to meet some serious criticism.</p>
<p>2) Not a standard<br />
I see no indication that this venture is representative of any sort of standard.  Security is a universal problem that demands a universal solution.  A Firefox favoring proprietary solution will certainly benefit Firefox as a product and reposition it in the grab for market share, but it will not fix the problem.  I strongly recommend that this action be written as an internet draft and submitted to the IETF as an extension of URI/HTTP.</p>
<p>3) No client-side control mechanism<br />
The root of the problem is that malicious software written by a stranger is executing at will at the user-agent.  This solution provides a mechanism for the site to inform the browser of the approved script repository where that script only is then executed in accordance with the status quo.  That mechanism will likely occur as an HTTP header to provide transparency to the user.  Unfortunately this still does not provide any control to the user of which code should or should not execute.  If malicious code is living in the blessed repository then nothing is gained and attacks continue without the user&#8217;s knowledge.  A user must be able to make decisions about what is executing on their own software on their own machine or the problem is merely diminished instead of solved.</p>
<p>4) Relay points<br />
There is no indication that scripts cannot point to a reference outside the blessed sandbox, which opens possibilities of attack from a couple different angles.  If script uses the XMLHttpRequest object to point to a location outside the blessed sandbox for additional instructions then nothing is gained by this mechanism.  The mere opening of such a connection could be a point of exploitation if the code or data being retrieved is entirely benign.  Again, there must be notifications provided to the user before code executes locally without prior discriminatory user consent.</p>
<p>You guys have my full support on this endeavor as drastic steps must be taken to solve this problem.  There are more XSS vulnerabilities reported than all other computer security vulnerabilities combined and doubled.  If this problem is not solved by any means necessary commerce on the web will fail, and the web itself will fail.</p>
<p>Before becoming aware of this work I posted a solution of migrating script execution to email using a secure mechanism.  The proposal is completely sound from both a technology and security perspective, but is so far extremely unpopular for eliminating execution of events.  Since this alternate solution is based off a more complex transmission mechanism it may or may not be helpful.  I hope that may be able to provide any additional guidance that may not have been previously considered.<br />
<a href="http://www.ietf.org/id/draft-cheney-safe-04.txt" rel="nofollow">http://www.ietf.org/id/draft-cheney-safe-04.txt</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Veditz</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105941</link>
		<dc:creator>Daniel Veditz</dc:creator>
		<pubDate>Tue, 14 Jul 2009 16:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105941</guid>
		<description>&quot;CSP, brought to you by the same guys who gave you contentaccessible=yes&quot; -- I sense our popularity with add-on developers rising by the day.</description>
		<content:encoded><![CDATA[<p>&#8220;CSP, brought to you by the same guys who gave you contentaccessible=yes&#8221; &#8212; I sense our popularity with add-on developers rising by the day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AckNack</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105939</link>
		<dc:creator>AckNack</dc:creator>
		<pubDate>Mon, 13 Jul 2009 23:39:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105939</guid>
		<description>&quot;On reflection, though, overrides might be a required workaround to avoid breaking add-ons that create mash-ups or add elements to content. Argh.&quot;

Yes. Greasemonkey would be sure to fail too, unless its given privs to inject javascript and content into web pages as it does now.

As part of these changes, pleeeeease preserve the ability to allow add-ons to continue to function correctly by allowing event/content/javascript injection as they can now do.  For example, the DejaClick addon has a feature to annotate web recording.  It does this by injecting user-recorded popup notes (html or SVG) into web pages as it replaying (via HTML and CSS content injection).  Also, there will soon be a feature in DejaClick to allow users to inject snippets of Javascript code before or after a replayed event for special circumstances.

Add-ons developers already went thru a similar fiasco by having to add &quot;contentaccessible=yes&quot; to the content directives of all their chrome.manifest files, so I certainly hope we don&#039;t make the same mistakes with this stuff.</description>
		<content:encoded><![CDATA[<p>&#8220;On reflection, though, overrides might be a required workaround to avoid breaking add-ons that create mash-ups or add elements to content. Argh.&#8221;</p>
<p>Yes. Greasemonkey would be sure to fail too, unless its given privs to inject javascript and content into web pages as it does now.</p>
<p>As part of these changes, pleeeeease preserve the ability to allow add-ons to continue to function correctly by allowing event/content/javascript injection as they can now do.  For example, the DejaClick addon has a feature to annotate web recording.  It does this by injecting user-recorded popup notes (html or SVG) into web pages as it replaying (via HTML and CSS content injection).  Also, there will soon be a feature in DejaClick to allow users to inject snippets of Javascript code before or after a replayed event for special circumstances.</p>
<p>Add-ons developers already went thru a similar fiasco by having to add &#8220;contentaccessible=yes&#8221; to the content directives of all their chrome.manifest files, so I certainly hope we don&#8217;t make the same mistakes with this stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: voracity</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105920</link>
		<dc:creator>voracity</dc:creator>
		<pubDate>Mon, 06 Jul 2009 03:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105920</guid>
		<description>Could someone perhaps explain what is wrong with sub-page sandboxing?

In particular, what does page-level sandboxing solve that sub-page level sandboxing cannot?</description>
		<content:encoded><![CDATA[<p>Could someone perhaps explain what is wrong with sub-page sandboxing?</p>
<p>In particular, what does page-level sandboxing solve that sub-page level sandboxing cannot?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Bell</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105904</link>
		<dc:creator>John Bell</dc:creator>
		<pubDate>Thu, 02 Jul 2009 15:42:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105904</guid>
		<description>@Daniel Veditz:  I certainly understand why you want to keep a narrow focus right now.  If it was me, I&#039;d actually think about building it into the spec since it&#039;s something that modifies the ruleset applied to the final page.  But obviously it&#039;s your spec, you can handle it however you want.  I just suspect that one of the questions you&#039;ll get from anybody you&#039;re trying to get excited about CSP is if it breaks any existing functionality, and (as one of the site authors in question) I know that &quot;yes&quot; isn&#039;t as good an answer to that question as &quot;yes, but we have a way around it&quot;.

But in any case, I&#039;m glad you&#039;re at least open to the possibility.  Thanks for listening.</description>
		<content:encoded><![CDATA[<p>@Daniel Veditz:  I certainly understand why you want to keep a narrow focus right now.  If it was me, I&#8217;d actually think about building it into the spec since it&#8217;s something that modifies the ruleset applied to the final page.  But obviously it&#8217;s your spec, you can handle it however you want.  I just suspect that one of the questions you&#8217;ll get from anybody you&#8217;re trying to get excited about CSP is if it breaks any existing functionality, and (as one of the site authors in question) I know that &#8220;yes&#8221; isn&#8217;t as good an answer to that question as &#8220;yes, but we have a way around it&#8221;.</p>
<p>But in any case, I&#8217;m glad you&#8217;re at least open to the possibility.  Thanks for listening.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arun Ranganathan</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105902</link>
		<dc:creator>Arun Ranganathan</dc:creator>
		<pubDate>Wed, 01 Jul 2009 14:06:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105902</guid>
		<description>@Andre: an early version of this solution was submitted to the W3C Web Apps WG.  See for example this thread of correspondence: 
http://lists.w3.org/Archives/Public/public-webapps/2008AprJun/0416.html

The charter of that WG was never modified to include CSP.  We&#039;re keen on working with a standards setting body, and are still in the process of determining where the proposal works best.</description>
		<content:encoded><![CDATA[<p>@Andre: an early version of this solution was submitted to the W3C Web Apps WG.  See for example this thread of correspondence:<br />
<a href="http://lists.w3.org/Archives/Public/public-webapps/2008AprJun/0416.html" rel="nofollow">http://lists.w3.org/Archives/Public/public-webapps/2008AprJun/0416.html</a></p>
<p>The charter of that WG was never modified to include CSP.  We&#8217;re keen on working with a standards setting body, and are still in the process of determining where the proposal works best.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bugmenot</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105901</link>
		<dc:creator>bugmenot</dc:creator>
		<pubDate>Wed, 01 Jul 2009 05:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105901</guid>
		<description>When this CSP implementation is expected to be available?</description>
		<content:encoded><![CDATA[<p>When this CSP implementation is expected to be available?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Veditz</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105900</link>
		<dc:creator>Daniel Veditz</dc:creator>
		<pubDate>Tue, 30 Jun 2009 22:25:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105900</guid>
		<description>@John Bell: It&#039;s good feedback, we&#039;ll have to think about it. It&#039;s certainly &quot;possible&quot; -- it&#039;s just code after all.

I have mixed feelings. I&#039;d really like to get people excited about CSP, site authors and other browser vendors in particular. A user-agent override doesn&#039;t belong in the specification that is a contract between the site and the browser, and while supporting overrides is a valid implementation decision talking about it is a bit of a distraction and may even undercut the message to site authors. It would also, of course, require more work on our part so I&#039;m not unbiased :-)

On reflection, though, overrides might be a required workaround to  avoid breaking add-ons that create mash-ups or add elements to content. Argh.</description>
		<content:encoded><![CDATA[<p>@John Bell: It&#8217;s good feedback, we&#8217;ll have to think about it. It&#8217;s certainly &#8220;possible&#8221; &#8212; it&#8217;s just code after all.</p>
<p>I have mixed feelings. I&#8217;d really like to get people excited about CSP, site authors and other browser vendors in particular. A user-agent override doesn&#8217;t belong in the specification that is a contract between the site and the browser, and while supporting overrides is a valid implementation decision talking about it is a bit of a distraction and may even undercut the message to site authors. It would also, of course, require more work on our part so I&#8217;m not unbiased <img src='http://blog.mozilla.com/security/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>On reflection, though, overrides might be a required workaround to  avoid breaking add-ons that create mash-ups or add elements to content. Argh.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Bell</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105899</link>
		<dc:creator>John Bell</dc:creator>
		<pubDate>Tue, 30 Jun 2009 21:27:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105899</guid>
		<description>@Daniel Veditz: I&#039;m disappointed to hear that.  Is it at least possible for the user to have a global whitelist that overrides the one defined by the page/headers?  A granular way to disable CSP that would allow it to still function in general, but trust all script includes that load from specific domains?  I certainly see the value in CSP in general and wouldn&#039;t want to recommend that people disable it completely, but a user whitelist (covered in enough warnings) seems like it would be a reasonable way to add CSP without limiting functionality.</description>
		<content:encoded><![CDATA[<p>@Daniel Veditz: I&#8217;m disappointed to hear that.  Is it at least possible for the user to have a global whitelist that overrides the one defined by the page/headers?  A granular way to disable CSP that would allow it to still function in general, but trust all script includes that load from specific domains?  I certainly see the value in CSP in general and wouldn&#8217;t want to recommend that people disable it completely, but a user whitelist (covered in enough warnings) seems like it would be a reasonable way to add CSP without limiting functionality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Veditz</title>
		<link>http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/comment-page-1/#comment-105898</link>
		<dc:creator>Daniel Veditz</dc:creator>
		<pubDate>Tue, 30 Jun 2009 19:46:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/security/?p=106#comment-105898</guid>
		<description>@John Bell: Some advanced bookmarklets may not work. If the bookmarklet does something that will load data from another site that action will be subject to the CSP whitelist. Anything the bookmarklet adds to the page is part of the page and subject to the limitations on the page.

It will be possible for users to disable Content Security Policy protection if for some reason they need to do so. The user can weigh the need to run their own script injection against the risk of unauthorized script injection.

@William: We still have a few blurry edges around plugins. Some plugins can make their own network connections that are completely out of the browsers control. If there&#039;s enough interest in CSP some of the plugin vendors may be interested in extending the NPAPI so they can participate in that model. Some people want to be able to control which types of plugin can load, not just from which sites. So far we&#039;ve resisted that complication but it&#039;s useful feedback. NPN_GetURL() and the like we&#039;re currently planning to vet against the plugin-src whitelist.

Currently NPN_Evaluate is allowed because you allowed the plugin to load, but we can argue that the plugin&#039;s origin should be vetted against the script-src whitelist before being allowed to call NPN_Evaluate(). It&#039;s an open question.</description>
		<content:encoded><![CDATA[<p>@John Bell: Some advanced bookmarklets may not work. If the bookmarklet does something that will load data from another site that action will be subject to the CSP whitelist. Anything the bookmarklet adds to the page is part of the page and subject to the limitations on the page.</p>
<p>It will be possible for users to disable Content Security Policy protection if for some reason they need to do so. The user can weigh the need to run their own script injection against the risk of unauthorized script injection.</p>
<p>@William: We still have a few blurry edges around plugins. Some plugins can make their own network connections that are completely out of the browsers control. If there&#8217;s enough interest in CSP some of the plugin vendors may be interested in extending the NPAPI so they can participate in that model. Some people want to be able to control which types of plugin can load, not just from which sites. So far we&#8217;ve resisted that complication but it&#8217;s useful feedback. NPN_GetURL() and the like we&#8217;re currently planning to vet against the plugin-src whitelist.</p>
<p>Currently NPN_Evaluate is allowed because you allowed the plugin to load, but we can argue that the plugin&#8217;s origin should be vetted against the script-src whitelist before being allowed to call NPN_Evaluate(). It&#8217;s an open question.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
