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

Fix XSS: Stenghten CSP rules on static file uploads #4629

Merged
merged 1 commit into from Feb 13, 2023

Conversation

NicolasDorier
Copy link
Member

Credit to @d47sec

XSS on static files that we fixed on #4567 isn't enough!

It is possible to just upload a js file, then upload a html file referencing it.
This will bypass our CSP because we use self rule.

This fix is still brittle to be honest. If there is a HTML injection somewhere, it can be leveraged to a script injection by referencing a malicious js file uploaded.
Will need more stuff.

@NicolasDorier NicolasDorier merged commit dffa6ac into btcpayserver:master Feb 13, 2023
@NicolasDorier NicolasDorier deleted the pgwngw branch February 13, 2023 14:04
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

Successfully merging this pull request may close these issues.

None yet

1 participant