News for hackers. Stuff that matters.
Re:Chrome extensions are tampering with security headers by hn_throwaway_99 on Tuesday May 25, 2021 @09:28PM (#27285054)
I think that the extension architecture should make it easy to declaratively state which URLs an extension will call back to, and then make it up to the browser to transparently update CSP headers to allow those calls.

As someone who runs a website with a strict CSP, when I first went live I was panicked by the fact that we got TONS of reports about CSP violations to our report URL. It was only then when I realized that our CSP was blocking a ton of extensions that people had installed. Honestly, I think at that point I would have preferred that the extension update our CSP, it's not like the extension couldn't already see everything on our pages.

Re:Chrome extensions are tampering with security headers by mschuster91 on Wednesday May 26, 2021 @04:26AM (#27287826)
> I think that the extension architecture should make it easy to declaratively state which URLs an extension will call back to, and then make it up to the browser to transparently update CSP headers to allow those calls.

Adblockers need to play whack-a-mole with this URL list to provide mocks that pretend to be ads to anti-adblock mechanisms, updating that declaration with extension updates every few hours will only lead to frustration.

Re:Chrome extensions are tampering with security headers by MomoXenosaga on Wednesday May 26, 2021 @07:48AM (#27289261)
Yeah extensions need to deal with ads and tracking and the only way to do it is to nuke the site from orbit.
Re:Chrome extensions are tampering with security headers by kid-icarus on Tuesday May 25, 2021 @09:35PM (#27285099)
I have that same issue, but I would much rather filter out extraneous CSP violations than have some exploited extension exfiltrate sensitive data.

Edit: typo

Re:Chrome extensions are tampering with security headers by hn_throwaway_99 on Tuesday May 25, 2021 @10:04PM (#27285309)
> I would much rather filter out extraneous CSP violations than have some exploited extension exfiltrate sensitive data

I am not familiar with the architectural framework of browser extensions, but would this already be possible, that is for an extension to read the contents of the page (which it obviously already has access to) but then send that information using a connection that doesn't operate in the same security context as the page that was read?

I mean, browser extension CSP violations are triggered because the extension just basically injects a script into the page. Is it possible for the extension to just filter the page context and make a remote request by some other means?

Re:Chrome extensions are tampering with security headers by k1m on Wednesday May 26, 2021 @03:39AM (#27287534)
> Is it possible for the extension to just filter the page context and make a remote request by some other means?

Yes it is. I think what you describe is in fact the preferred way for extensions that need to communicate with a remote service are expected to work, and when implemented that way, the CSP rules (rightly) don't apply.

From what I understood of the article, this alternative way of sending data isn't what they mean by extensions tampering with security headers. The article doesn't go into detail but it would be interesting to see if the header tampering is necessary in all these cases, or if a different approach could work without triggering CSP.