this post was submitted on 06 Jul 2023
65 points (97.1% liked)
Cybersecurity
5754 readers
170 users here now
c/cybersecurity is a community centered on the cybersecurity and information security profession. You can come here to discuss news, post something interesting, or just chat with others.
THE RULES
Instance Rules
- Be respectful. Everyone should feel welcome here.
- No bigotry - including racism, sexism, ableism, homophobia, transphobia, or xenophobia.
- No Ads / Spamming.
- No pornography.
Community Rules
- Idk, keep it semi-professional?
- Nothing illegal. We're all ethical here.
- Rules will be added/redefined as necessary.
If you ask someone to hack your "friends" socials you're just going to get banned so don't do that.
Learn about hacking
Other security-related communities [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
Notable mention to [email protected]
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Does the default CSP do anything to mitigate this?
https://github.com/LemmyNet/lemmy-ui/blob/9ce164245f51b834997f31f3f12497ee87474965/src/server/middleware.ts#L12
I believe if
unsafe-inline
were removed fromscript-src
then the CSP would block this.If the frontend depends on inline script tags then this likely can't be changed super easily... The fact that
unsafe-eval
is inscript-src
is kinda worrying as well. Ideally you would lock the CSP down a lot more than they have.Aye, I am pretty sure CSP is bypass-able in most situations unless your pinning checksums or hashes. Just thought it might help take the edge off the hacker panic.
Yeah, it can certainly help in some cases, defense in depth and all that. If the CSP were 'self' (allowing any JS hosted on your domain) this would probably be DoA. Sadly, until the frontend stops using
<script>
to set things onwindow
to hydrate state from SSR to client-side they won't be able to change it without breaking things.