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 conflict resolution logic for read_only and hide_passwords flags #2073

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

jjlin
Copy link
Contributor

@jjlin jjlin commented Oct 29, 2021

For one of these flags to be in effect for a cipher, upstream requires all of
(rather than any of) the collections the cipher is in to have that flag set.

Also, some of the logic for loading access restrictions was wrong. I think
that only malicious clients that also had knowledge of the UUIDs of ciphers
they didn't have access to would have been able to take advantage of that.

Fixes #2072.

For one of these flags to be in effect for a cipher, upstream requires all of
(rather than any of) the collections the cipher is in to have that flag set.

Also, some of the logic for loading access restrictions was wrong. I think
that only malicious clients that also had knowledge of the UUIDs of ciphers
they didn't have access to would have been able to take advantage of that.
@dani-garcia dani-garcia merged commit 73e0002 into dani-garcia:main Nov 1, 2021
@jjlin jjlin deleted the fix-access-logic branch November 2, 2021 08:13
@perkons
Copy link

perkons commented Nov 3, 2021

Thank you very much for the very fast fix and for your work! It is working now as expected.

One issue/exploit that I found now is that a user with "Hide Passwords" permissions in a collection can add an item from this collection to another collection with no "Hide Passwords" permissions and remove it from the one where he has "Hide Passwords". After that is done the user can view the password. So the "Hide Passwords" option becomes useless if not used together with "Read Only".

I personally think that the best solution here would be to limit permissions on a collection that has "Hide Passwords". I think the best solution that I can think of is to remove the Collections option under the Cog symbol when "Hide Passwords" is checked. So "Hide Passwords" would forbid the removal from items from the collection. If a feature request is needed I can create one, but I think that this can maybe be considered to be a bug?

I am Using vaultwarden/server:testing-alpine@sha256:3f9d68af0d3b86b941a1bbdb77b27e61188adfcfadc09b2d6aeca67ce923a84f

@jjlin
Copy link
Contributor Author

jjlin commented Nov 3, 2021

One issue/exploit that I found now is that a user with "Hide Passwords" permissions in a collection can add an item from this collection to another collection with no "Hide Passwords" permissions and remove it from the one where he has "Hide Passwords". After that is done the user can view the password. So the "Hide Passwords" option becomes useless if not used together with "Read Only".

"Hide Passwords" is only intended to act as a hurdle for typical, unsophisticated users, not "clever" ones. Given it's only enforced on the client side, it's easy to disable for someone who knows what they're doing, especially in the web vault.

I personally think that the best solution here would be to limit permissions on a collection that has "Hide Passwords". I think the best solution that I can think of is to remove the Collections option under the Cog symbol when "Hide Passwords" is checked. So "Hide Passwords" would forbid the removal from items from the collection. If a feature request is needed I can create one, but I think that this can maybe be considered to be a bug?

Vaultwarden doesn't implement custom client-side features, so you would have to make your case with upstream Bitwarden at https://community.bitwarden.com/c/feature-requests/5/.

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.

user sharing item to another collection that has "Hide Passwords" cannot read the password any more
3 participants