mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #6871] Permission Editing not possible #2560
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#2560
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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
github.com/dani-garcia/vaultwarden@c555f7d198/src/db/models/organization.rs (L517)so it is not checking whether a Manager has the
access_allpermission.And
github.com/dani-garcia/vaultwarden@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.