mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-22 16:14:20 -05:00
[GH-ISSUE #6871] Permission Editing not possible #19332
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marvineimer-kw on GitHub (Feb 25, 2026).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/6871
Prerequisites
Vaultwarden Support String
While editing permissions as a Manager, you get logged out after trying to Edit Permissions on a Collection.
Might be caused by the recent Vulnerability-Fix
Vaultwarden Build Version
1.35.4
Deployment method
Official Container Image
Custom deployment method
No response
Reverse Proxy
nginx
Host/Server Operating System
Linux
Operating System Version
No response
Clients
Web Vault
Client Version
No response
Steps To Reproduce
With existing Collections it works to edit the Rights
Expected Result
The Setting will be saved.
Actual Result
You get logged out with Error: No Permission
Logs
Screenshots or Videos
No response
Additional Context
No response
@BlackDex commented on GitHub (Feb 25, 2026):
Are you sure you are a manager for that specific collection? Or that you are a Manager who is able to manage all collections?
If not, then this is the expected endresult.
@marvineimer-kw commented on GitHub (Feb 25, 2026):
I just checked its only with newly created Collections. After creating the Collection you cant edit it. In this case, you are manager of the Collection.
I also Updated the Description.
@BlackDex commented on GitHub (Feb 26, 2026):
I'm not able to reproduce this in any way.
I created a new manager with the
Manage all collectionsThat user is able to create, edit and delete collections created by that user.
If i assign a user to the
customrole and not enableManage all collectionsand grant that userManagerights to a new Collection, that user is able to adjust rights or rename that collection, but isn't allowed to delete it, which is the intended behavior.Maybe try to update the user's rights, that might help?
Or, there are group policies applied which might prevent that manager from having manage access? Since least privileges are used if set somewhere if I'm correct.
@rafaelfariasbsb commented on GitHub (Feb 26, 2026):
Root Cause Analysis
I investigated this issue and found the bug in the collection creation endpoint at
src/api/core/organizations.rs, line 524.When a Manager without
access_allcreates a new collection, the code adds aCollectionUserrecord for them, but withmanage=false:Later, when the Manager tries to edit that collection via
PUT /api/organizations/<org_id>/collections/<col_id>, theManagerHeadersrequest guard callsCollection::is_coll_manageable_by_user(), which checks for any of these conditions:users_collections.manage == true— false (the bug)users_organizations.access_all == true— false (Manager doesn't haveaccess_all)users_organizations.atype <= Admin— false (Manager is not Admin/Owner)access_allormanage— depends on configSince none of the conditions are met, the guard fails with
"The current user isn't a manager for this collection"and returns 401.Why it wasn't reproduced by @BlackDex
The test was done with a Manager that had
Manage all collectionsenabled, which setsaccess_all=trueon the membership. In that case, the condition on line 523 (!headers.membership.access_all) prevents the code block from executing at all — and the permission check passes through condition #2 above. The bug only manifests when the Manager does not haveaccess_all.Fix
The last parameter of
CollectionUser::save(manage) should betrueinstead offalse. If a Manager has permission to create a collection, they should logically be able to manage it:@BlackDex commented on GitHub (Feb 26, 2026):
Nice that AI found something, but a non-access all manager isn't allowed to create collections if I'm not mistaking.
I can try and check again.
@stefan0xC commented on GitHub (Feb 26, 2026):
I think you are because currently it just checks
c555f7d198/src/db/models/organization.rs (L517)so it is not checking whether a Manager has the
access_allpermission.And
c555f7d198/src/api/core/organizations.rs (L523-L525)also does not prevent a manager from creating a collection withoutaccess_alleither so this should both be adjusted if it's not intended.@BlackDex commented on GitHub (Feb 26, 2026):
Ah, yet a nother situation of not fully validating the API Calls.
The web-vault doesn't allow it, but probably the API does, that should be fixed than.
Ill have to check a bit better regarding the rights though, but i think we currently do not allow non access all managers to create collections. I even recently fixed a security issue because of this.
@stefan0xC commented on GitHub (Feb 26, 2026):
I've just tested it and the web-vault allows Managers without
access_allto create new collections.https://github.com/user-attachments/assets/9a25dd69-771e-45e1-b922-c3bdec4ed7d4
@BlackDex commented on GitHub (Feb 26, 2026):
Ah well, i think i tried that, and was indeed able to do that, but still also able to adjust and delete.
But, as mentioned, ill check again, and see what the correct rights and way should be.
@rafaelfariasbsb commented on GitHub (Feb 26, 2026):
Thanks for the additional context. Based on the discussion, it seems there are two possible approaches here:
A) Allow non-
access_allManagers to create collections (current web vault behavior):The fix would be as proposed in the PR — set
manage=truewhen saving theCollectionUserrecord, so the creating Manager can manage their own collection.B) Restrict collection creation to Managers with
access_allonly:The fix would be to add a validation check in the creation endpoint to reject requests from Managers without
access_all, aligning the API with stricter permission rules.@BlackDex which approach do you consider correct? I can adjust the PR accordingly.
@uedvt359 commented on GitHub (Mar 3, 2026):
Restricting collection creation to manage_all managers would be very bad for our use case.
We are using Vaultwarden in our Office. Each team has one VW-manager who creates collections. If creating collections would require manage_all, then the VW-manager of Team A could modify the access rights to collections of Team B - including inviting themselves to passwords they shouldn't have access to.
That would be a net-negative, in terms of security.
Looking upstream to Bitwarden, restricting collection creation (and separately, collection deletion) is an opt-in feature, configurable per-organisation: https://bitwarden.com/help/collection-management/#restrict-collection-creation-to-owners-and-admins
This is by default not enabled - by default, all managers can create and delete collections!
@BlackDex commented on GitHub (Mar 16, 2026):
I understand that the use case described here would be broken by a current pending PR, but since this currently is how Vaultwarden works, and the more customized RBAC is not yet available in Vaultwarden, this currently is how Vaultwarden works until the more fine-grained RBAC is available.
There, this is currently how Vaultwarden should work and therefor is a works-as-intended.