3 ms·
Content security policy seems to block this for me, so at least there is that. Content-Security-Policy: default-src 'self'; script-src 'self' platform.twit
by GlitchMr 9y ago
Content security policy seems to block this for me, so at least there is that.
Content-Security-Policy: default-src 'self'; script-src 'self' platform.twitter.com syndication.twitter.com gitcdn.github.io code.jquery.com maxcdn.bootstrapcdn.com cdnjs.cloudflare.com dcggld9bcojs3.cloudfront.net; img-src data: 'self' dcggld9bcojs3.cloudfront.net; style-src 'self' 'unsafe-inline' gitcdn.github.io maxcdn.bootstrapcdn.com cdnjs.cloudflare.com; font-src 'self' data: ; form-action 'self'; child-src 'self' platform.twitter.com; connect-src 'self' syndication.twitter.com;
I'm not entirely sure why gitcdn.github.io is on list of allowed script paths, but at least XSS injection is not straightforward, to run scripts, you need to hijack one of those hosts.
---
As for insecure claim, it does have an XSS attack, but Content-Security-Policy reduces its impact to minimum. You cannot make do a request to an arbitrary domain by loading an external resource. So even if one part is insecure, the other one prevents an attack - security in depth. Of course, they still should fix that XSS attack.
I also decided to check if they don't sign certificates for domains that disallow this (by means of CAA DNS record). They properly do, as SSL baseline requirements say, so nothing to report.
- lol768 9y agoWhitelisting entire CDNs like that is incredibly dangerous, see https://github.com/cure53/XSSChallengeWiki/wiki/H5SC-Minichallenge-3:-%22Sh*t,-it%27s-CSP!%22 https://github.com/cure53/XSSChallengeWiki/wiki/H5SC-Minicha...
- GlitchMr 9y agoOh, you are correct. This will only delay an attack. There is however some sort of firewall preventing using `<script>` tag.
- chrismorgan 9y ago> You cannot make do a request to an arbitrary domain by loading an external resource. Not true; thanks to style-src 'unsafe-inline', <style>:root{background-image:url(https://example.com/)}</style> https://example.com/)}</style> will work just fine.