Neatly Bypassing Content Security Policy
lab.wallarm.com
Neatly Bypassing Content Security Policy
1–10 of 38 posts
Re: Neatly Bypassing Content Security Policy
#2Re: Neatly Bypassing Content Security Policy
#3Why is CSP so under-utilized? Less than 0.2% of the top 1m sites[0]. Although only 9% use basic features like secure cookies, and 6% HSTS.
[0] https://blog.mozilla.org/security/2018/02/28/analysis-alexa-...
Re: Neatly Bypassing Content Security Policy
#4Great article. Why is CSP so under-utilized? Less than 0.2% of the top 1m sites[0]. Although only 9% use basic features like secure cookies, and 6% HSTS. [0] https://blog.mozilla.org/security/2018/02/28/analysis-alexa-...
I think a few reasons:
1. It's not a sufficient replacement for sanitizing input. You need to sanitize; CSP is just an extra layer of protection.
2. relative new.
3. many popular frameworks don't support it out of the box.
Re: Neatly Bypassing Content Security Policy
#5" rel="nofollow">http://example.com">
Re: Neatly Bypassing Content Security Policy
#6Great article. Why is CSP so under-utilized? Less than 0.2% of the top 1m sites[0]. Although only 9% use basic features like secure cookies, and 6% HSTS. [0] https://blog.mozilla.org/security/2018/02/28/analysis-alexa-...
> Why is CSP so under-utilized? I think a few reasons: 1. It's not a sufficient replacement for sanitizing input. You need to sanitize; CSP is just an extra layer of protection. 2. relative new. 3. many popular frameworks don't support it out of the box.
Re: Neatly Bypassing Content Security Policy
#7Earlier quoted context omitted.
> Why is CSP so under-utilized? I think a few reasons: 1. It's not a sufficient replacement for sanitizing input. You need to sanitize; CSP is just an extra layer of protection. 2. relative new. 3. many popular frameworks don't support it out of the box.
The deployment difficulty is also high, especially for what it offers. Deploying CSP on anything non-trivial involves a lot of coordination with basically anyone who runs code on your site.
Lots of sites have marketing departments which like to switch out their advertising, engagement, A/B testing, etc. code on a regular basis. Which in turn requires either changing the CSP frequently to accommodate, or else opening holes in the CSP to allow marketing to just copy/paste inline JS and other badness. At which point it's hard to justify CSP.
Re: Neatly Bypassing Content Security Policy
#8Just adding the sandbox attribute is enough to severely lock down an iframe. " rel="nofollow">http://example.com">
There's also ' frame-src' for content security policies, which lets you control what is allowed in the iframe's src. Even with these guards in place, you generally should not let user content drive an iframe's src
Re: Neatly Bypassing Content Security Policy
#9Re: Neatly Bypassing Content Security Policy
#10Great article. Why is CSP so under-utilized? Less than 0.2% of the top 1m sites[0]. Although only 9% use basic features like secure cookies, and 6% HSTS. [0] https://blog.mozilla.org/security/2018/02/28/analysis-alexa-...
It's especially annoying on github.