Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension creates security problems for sites and users #1

Open
dveditz opened this issue Aug 10, 2021 · 0 comments
Open

Extension creates security problems for sites and users #1

dveditz opened this issue Aug 10, 2021 · 0 comments

Comments

@dveditz
Copy link

dveditz commented Aug 10, 2021

Removing the forced download creates a security problem for your users

One main reason sites use Content-Disposition: attachment is to protect users from potentially unsafe content, especially user-uploaded content. The content might be safe enough on its own, but if opened "on" the site and it's a type that can run scripts or has links it can allow this content to be a vector for stored-Cross-Site-Scripting attacks. The creator of that content could then do anything you can do on that site. On a social site that might mean reading all your posts or messages, or deleting them all to be a jerk, harvesting all your contacts, posting offensive things as "you".

You might be able to mitigate a lot of this danger if you also added a Content-Security-Policy: sandbox header. I haven't given a lot of thought to which sandbox options you would need, but definitely do NOT add allow-same-origin or you defeat the whole point of sandboxing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant