[Bug] Latest testing, group permissions allows user role to delete password entries (and revoke password collections) via extension. #447

Closed
opened 2025-10-09 16:31:19 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @jb2barrels on GitHub.

Subject of the issue

Latest testing, group permissions allows user role to delete password entries (and revoke password collections) via extension.

Deployment environment

  • vaultwarden version: Latest testing

  • Install method: Docker - vaultwarden/server:testing

  • Clients used: 2024.6.2 (Browser Extension, Google Chrome)

  • MySQL/MariaDB or PostgreSQL version: Postgres

  • Other relevant details: Web vault properly shows password collection checkboxes as grayed out when attempting to modify a password entry's collections as the user role. On the Bitwarden extension, these boxes are not greyed out and allow you to succesfully update a password entry's collections. Additionally the user role is able to delete passwords in the organization.

Expected behaviour

User role should be unable to revoke collection permissions using the Bitwarden extension. Additionally I assume they should also be unable to delete passwords from the organization, unless they are a higher role?
Since the web vault works as expected for not being able to revoke an entries collections, I assume maybe a specific API call the extension does also needs to be updated?

Troubleshooting data

This is related to the changes after the following merged pull request:

Originally created by @jb2barrels on GitHub. ### Subject of the issue Latest testing, group permissions allows user role to delete password entries (and revoke password collections) via extension. ### Deployment environment * vaultwarden version: Latest testing * Install method: Docker - vaultwarden/server:testing * Clients used: 2024.6.2 (Browser Extension, Google Chrome) * MySQL/MariaDB or PostgreSQL version: Postgres * Other relevant details: Web vault properly shows password collection checkboxes as grayed out when attempting to modify a password entry's collections as the user role. On the Bitwarden extension, these boxes are not greyed out and allow you to succesfully update a password entry's collections. Additionally the user role is able to delete passwords in the organization. ### Expected behaviour User role should be unable to revoke collection permissions using the Bitwarden extension. Additionally I assume they should also be unable to delete passwords from the organization, unless they are a higher role? Since the web vault works as expected for not being able to revoke an entries collections, I assume maybe a specific API call the extension does also needs to be updated? ### Troubleshooting data This is related to the changes after the following merged pull request: - https://github.com/dani-garcia/vaultwarden/pull/4592 @stefan0xC (Which also related to https://github.com/dani-garcia/vaultwarden/issues/4588 ) - The pull request fixed the manager role's ability to modify password entry collections, but instead traded off the issue with providing user's role more permissions then allowed.
OVERLORD added the enhancementtroubleshooting labels 2025-10-09 16:31:19 +03:00
Author
Owner

@jb2barrels commented on GitHub:

@stefan0xC You may ignore the delete password entries part of my report - I believe I misunderstood the user roles regarding that part.

You will see in this example the test user has permission to modify collections on the extension which shouldn't be possible, but the web vault correctly does not have the permission to do so.

Additionally towards the bottom with screenshots, you will see a User is unable to add new entries to a vault which they have 'view only' permissions even though the User role indicates they should be able to atleast add entries. (You may correct me if i am wrong on interpreting this part)

example-permissions



Here is the detailed screenshots, incase this helps with replicating my scenario:

Username: TestUser
Organization Role: User (Access and add items to assigned collections)

User's permissions:
image
image
image

User's view of the vault, collections, and available entries:
image


Collections:

  • TESTING-COLLECTION-CAN-EDIT-1
  • TESTING-COLLECTION-CAN-EDIT-2
  • TESTING-COLLECTION-CAN-VIEW-1
  • TESTING-COLLECTION-CAN-VIEW-2

image


Groups:

image

  • TESTING-GROUP-CAN-EDIT

    • Assigned Collections (With Can Edit)
      image
  • TESTING-GROUP-CAN-VIEW

    • Assigned Collections (With Can View)
      image

Unable to add new entries as user to a 'Can View' as User role (User role defined as 'Access and add items to assigned collections)

image


Correct Behavior of editing password entries collection's per web vault:
image

Incorrect behavior of editing password entries collection's per web vault:

Same password entry '' with the ability to modify the collection entry checkboxes via the Browser extension on Google Chrome:
image
image
image

Entry confirmed to have been modified using extension (as viewed by the web vault):
image

@jb2barrels commented on GitHub: @stefan0xC You may ignore the delete password entries part of my report - I believe I misunderstood the user roles regarding that part. You will see in this example the test user has permission to modify collections on the extension which shouldn't be possible, but the web vault correctly does not have the permission to do so. Additionally towards the bottom with screenshots, you will see a User is unable to add new entries to a vault which they have 'view only' permissions even though the User role indicates they should be able to atleast add entries. (You may correct me if i am wrong on interpreting this part) ![example-permissions](https://github.com/dani-garcia/vaultwarden/assets/129100561/cfe4b609-feb3-46ee-b0f1-51576853fea5) ----------------- ----------------- ### Here is the detailed screenshots, incase this helps with replicating my scenario: Username: TestUser Organization Role: User (Access and add items to assigned collections) User's permissions: ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/8179b35d-c1e8-4bbb-9b71-56bc1484661e) ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/7513a7cf-eca6-4347-96b9-5162ca32ce96) ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/721f2e5a-d583-4bf8-833f-8f90d03ea92d) User's view of the vault, collections, and available entries: ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/20d35a44-7447-4f22-9386-0c43191fd594) ------------------ Collections: - TESTING-COLLECTION-CAN-EDIT-1 - TESTING-COLLECTION-CAN-EDIT-2 - TESTING-COLLECTION-CAN-VIEW-1 - TESTING-COLLECTION-CAN-VIEW-2 ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/6e2d777f-2c80-4eda-b37d-8ef6fc6e7312) ------------------ Groups: ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/47c86823-ac42-44b2-8021-bcea60c93f61) - TESTING-GROUP-CAN-EDIT - Assigned Collections (With Can Edit) ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/9d3f0146-8173-4238-bb2d-2fafe7e9d7e0) - TESTING-GROUP-CAN-VIEW - Assigned Collections (With Can View) ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/0a0b76b7-c3a8-448e-83ba-7363adde2162) ------------------ Unable to add new entries as user to a 'Can View' as User role (User role defined as 'Access and add items to assigned collections) ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/a0bf4519-5dd5-43b4-ad11-4c741276fef4) ------------------ Correct Behavior of editing password entries collection's per web vault: ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/b3721662-e575-412f-b35a-449e85409333) Incorrect behavior of editing password entries collection's per web vault: Same password entry '' with the ability to modify the collection entry checkboxes via the Browser extension on Google Chrome: ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/c67bbd94-81d5-4330-9628-b1fc02009dba) ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/0c40bb66-7592-4c52-ad91-df732551fea8) ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/1cb1b7ae-6b0f-4cfa-8a35-6e1c869314a3) Entry confirmed to have been modified using extension (as viewed by the web vault): ![image](https://github.com/dani-garcia/vaultwarden/assets/129100561/9956dd89-9afc-46da-bb66-197db2adb882)
Author
Owner

@jb2barrels commented on GitHub:

@stefan0xC I have completed testing of permissions of the User role on the official Bitwarden instance, these were the results.

Test User - with User role in organization.

  • Has 'Can Manage' access to collection 'TestCollection-CanManage'

    • Can add new Password Entry (Confirmed, can add using both Web Vault and Browser Extension)
    • Can delete entries from 'TestCollection-CanManage'
    • Can edit entries from 'TestCollection-CanManage'
    • Can restored deleted entries from 'TestCollection-CanManage'
  • Has 'Can View' access to collection 'TestCollection-CanView'

    • Can not add password entries (Confirmed, collection 'TestCollection-CanView' is not shown as an available collection to add the entry to in both Web vault and Browser extension)
    • Can not delete entries from 'TestCollection-CanView'
    • Can not edit entries from 'TestCollection-CanView' (You can save - probably for the folder feature, but fields are greyed out for modification)
    • Can not update a view-only entry in 'TestCollection-CanView' to add it to another collection you have edit access to, even if you have Edit permissions to 'TestCollection-CanManage'
    • Can restore a deleted entry from the collection back into 'TestCollection-CanView'
@jb2barrels commented on GitHub: @stefan0xC I have completed testing of permissions of the User role on the official Bitwarden instance, these were the results. Test User - with User role in organization. - Has 'Can Manage' access to collection 'TestCollection-CanManage' - Can add new Password Entry (Confirmed, can add using both Web Vault and Browser Extension) - Can delete entries from 'TestCollection-CanManage' - Can edit entries from 'TestCollection-CanManage' - Can restored deleted entries from 'TestCollection-CanManage' - Has 'Can View' access to collection 'TestCollection-CanView' - Can not add password entries (Confirmed, collection 'TestCollection-CanView' is not shown as an available collection to add the entry to in both Web vault and Browser extension) - Can not delete entries from 'TestCollection-CanView' - Can not edit entries from 'TestCollection-CanView' (You can save - probably for the folder feature, but fields are greyed out for modification) - Can not update a view-only entry in 'TestCollection-CanView' to add it to another collection you have edit access to, even if you have Edit permissions to 'TestCollection-CanManage' - Can restore a deleted entry from the collection back into 'TestCollection-CanView'
Author
Owner

@stefan0xC commented on GitHub:

Thanks for the screenshots.

Unable to add new entries as user to a 'Can View' as User role

It seems very intentional that you can't add new items to a non-editable collection (or an organization, if you only have view permissions).

Correct Behavior of editing password entries collection's per web vault:
image

This seems wrong to me. If the item is in a can edit collection, why shouldn't you be able to change the collection of that item? According to https://bitwarden.com/help/user-types-access-control/ you should be able to "add, edit, or remove items from assigned collections, unless assigned Can view permission."

So to me it seems there are two different issues:
a) you can't change the assigned collections to items in the web-vault (whether or not you have the edit permission to a collection or even if you have been granted access to all current and future collections)
b) you seem to be able to change the collections of items in view only collections in the browser extension (which is prevented by Vaultwarden because you really shouldn't be able to)

@stefan0xC commented on GitHub: Thanks for the screenshots. > Unable to add new entries as user to a 'Can View' as User role It seems very intentional that you can't add new items to a non-editable collection (or an organization, if you only have view permissions). > Correct Behavior of editing password entries collection's per web vault: > ![image](https://github.com/dani-garcia/vaultwarden/assets/509385/51829613-ba1f-48a4-81a1-06b15203ac9f) This seems wrong to me. If the item is in a **can edit** collection, why shouldn't you be able to change the collection of that item? According to https://bitwarden.com/help/user-types-access-control/ you should be able to "add, edit, or remove items from assigned collections, unless assigned **Can view** permission." So to me it seems there are two different issues: a) you can't change the assigned collections to items in the web-vault (whether or not you have the edit permission to a collection or even if you have been granted `access to all current and future collections`) b) you seem to be able to change the collections of items in view only collections in the browser extension (which is prevented by Vaultwarden because you really shouldn't be able to)
Author
Owner

@stefan0xC commented on GitHub:

Can you please be more specific what the issue is or how to reproduce the issue? Because I'm not sure I understand it.

If I have a user that has only view permissions on a specific collection via a group (and no other write permission either directly or via another group) I cannot change items in that collection (and also not delete them so this seems to work as intended as far as I can tell). And if I try to add an item via the browser extension to a new collection (where I have write access) I'll get the error message "Cipher is not write accessible". (That the extension displays the collection as assignable when it is not is probably a bug in the client, not sure there's anything we can do about it.)

@stefan0xC commented on GitHub: Can you please be more specific what the issue is or how to reproduce the issue? Because I'm not sure I understand it. If I have a user that has only view permissions on a specific collection via a group (and no other write permission either directly or via another group) I cannot change items in that collection (and also not delete them so this seems to work as intended as far as I can tell). And if I try to add an item via the browser extension to a new collection (where I have write access) I'll get the error message "Cipher is not write accessible". (That the extension displays the collection as assignable when it is not is probably a bug in the client, not sure there's anything we can do about it.)
Author
Owner

@jb2barrels commented on GitHub:

I'll see if i can compare sometime this week the permissions to how official Bitwarden does it on their WebUI/Extensions.
That way we can get concrete verification of what intended behavior we are expecting.

@jb2barrels commented on GitHub: I'll see if i can compare sometime this week the permissions to how official Bitwarden does it on their WebUI/Extensions. That way we can get concrete verification of what intended behavior we are expecting.
Author
Owner

@BlackDex commented on GitHub:

@jb2barrels I just tested this and I am unable to reproduce this in anyway.
I verified it with an original Bitwarden account.

I'm just not able to edit any VIEW item in any way.
The only thing i can do is change the folder which is allowed and it will only change the folder and nothing else.
This is also possible via any client as far as i know, including the Browser Extensions or other clients.

Only pressing the save button and showing that it was saved doesn't mean the cipher it self was updated.
A totally different endpoint is used for these calls.

Here is a screenshot of the member groups and collections and the permissions:
Groups:
image
Collections:
image

And here the member list:
image

Since I'm really really not able to let a user edit any item within the VIEW collections/groups I'm going to close this.

If you are still able to reproduce this using the testing tagged images of Vaultwarden please provide more screenshots of the settings of the user, the collections and the groups.

And as @stefan0xC noticed, the part where you are saying the user is allowed to save a cipher are ciphers located in the EDIT collections/groups.

@BlackDex commented on GitHub: @jb2barrels I just tested this and I am unable to reproduce this in anyway. I verified it with an original Bitwarden account. I'm just not able to edit any `VIEW` item in any way. The only thing i can do is change the folder which is allowed and it will only change the folder and nothing else. This is also possible via any client as far as i know, including the Browser Extensions or other clients. Only pressing the save button and showing that it was saved doesn't mean the cipher it self was updated. A totally different endpoint is used for these calls. Here is a screenshot of the member groups and collections and the permissions: **Groups:** ![image](https://github.com/user-attachments/assets/1d3f2ce4-36a6-4471-8047-977d6ebcefa5) **Collections:** ![image](https://github.com/user-attachments/assets/31ee32c2-4563-4b9e-8806-2cafbbff90bc) And here the member list: ![image](https://github.com/user-attachments/assets/5479a14c-3296-4e72-9182-8f8129f9399b) Since I'm really really not able to let a user edit any item within the `VIEW` collections/groups I'm going to close this. If you are still able to reproduce this using the `testing` tagged images of Vaultwarden please provide more screenshots of the settings of the user, the collections and the groups. And as @stefan0xC noticed, the part where you are saying the user is allowed to save a cipher are ciphers located in the `EDIT` collections/groups.
Author
Owner

@BlackDex commented on GitHub:

Since we currently do not support the canManage feature via the interface this is probably going to rather difficult to fix in good way.

We need to overhaul the permissions anyway if we want to support the new roles and flexible collections.

This overhaul should also include a re-design of the groups/collections interaction and how the data is stored. Instead of storing everything fully normalized into multiple tables, we just need to store these items into one table where possible.

This should make the queries to determine if users should have access or not either via direct collection assignment or via groups easier.

But this has to be thought of in a good way.

@BlackDex commented on GitHub: Since we currently do not support the `canManage` feature via the interface this is probably going to rather difficult to fix in good way. We need to overhaul the permissions anyway if we want to support the new roles and flexible collections. This overhaul should also include a re-design of the groups/collections interaction and how the data is stored. Instead of storing everything fully normalized into multiple tables, we just need to store these items into one table where possible. This should make the queries to determine if users should have access or not either via direct collection assignment or via groups easier. But this has to be thought of in a good way.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#447