2 ms·
Edited: The original example I had here is wrong because of a mismatched TLD. From their own description of the technology (I am not a Bitwarden user) with Bit
by tialaramex 6y ago
Edited: The original example I had here is wrong because of a mismatched TLD.
From their own description of the technology (I am not a Bitwarden user) with Bitwarden's default behaviour if you have credentials for the EXA Metal Pole Europe secure website https://example.co.uk/ https://example.co.uk/ it will provide those credentials automatically, without prompting, to the completely different, unsecured site http://cat-jokes.example.co.uk/ http://cat-jokes.example.co.uk/ if any requests to that site are made.
Notice that as an on path bad guy I don't need to own example.co.uk or cat-jokes.example.co.uk, I just need to persuade your browser (e.g. with an image link) that it wants to fetch resources from http://cat-jokes.example.co.uk/ http://cat-jokes.example.co.uk/ for which it needs to do Basic auth and Bitwarden will write your example.co.uk credentials to the wire in plaintext. YSOABII.
I don't think this obeys the principle of least surprise. I don't think it's a secure behaviour to have at all even for fairly experienced users, and I definitely don't think it should be the default.
The safe default is Same Origin Policy which is similar to their "same host" but a bit different. Others have recommended the PSL, and that's certainly less awful than what Bitwarden does now, but it's not good, I certainly wouldn't want Bitwarden to switch to the PSL and then just figure job done and walk away.
- philliphaydon 6y agoIf you’re hosting a static website on cat-jokes... then any requests made are going to the owners of example.co.uk not to whoever has cat-jokes... It only works if the sub domain grants you some sort of usage on that sub domain. But how many hosts are like that these days?!? One example given is GitHub, but it doesn’t allow you to host serverside code. It’s purely static. Wordpress maybe? But I’ve never used hosted Wordpress so I donno what access you get.
- tialaramex 6y agoThe on path attacker isn't hosting the website (static or otherwise) on http://cat-jokes.example.co.uk/ http://cat-jokes.example.co.uk/ indeed with more work the name needn't even "exist" let alone a site. Let's suppose I'm an on path adversary, you're my victim and example.co.uk are a passive third party. You have credentials for https://example.co.uk/ https://example.co.uk/ stored in Bitwarden with default settings I inject any URL into any flow that will cause your browser to try to fetch something from http://cat-jokes.example.co.uk/ http://cat-jokes.example.co.uk/ maybe it's an image URL, or a frame. But that's an HTTP site, so I can intervene when your browser connects and impersonate as cat-jokes.example.co.uk to ask for Basic auth credentials, Bitwarden cheerfully fills them out automatically with your credentials for the secure site https://example.co.uk/ https://example.co.uk/ and sends them plaintext so now I get your credentials. Nothing looks out of place to you, maybe an image or frame was slow to load, but certainly no alerts, no indication anything weird happened.
- fanf2 6y agoThe scope of basic auth credentials is much tighter than even the same origin policy: it also requires the path to match - see section 2.2 of RFC7617 https://tools.ietf.org/html/rfc7617#section-2.2 https://tools.ietf.org/html/rfc7617#section-2.2 So Bitwarden’s behaviour is a protocol violation.