GHSA-569v-845w-g82p / CVE-2026-43912: Cross-Org Group Binding Enables Unauthorized Read And Write Access Into Another Organization
- Published:
- Fetched:
- Updated:
- Affects:
- dani-garcia vaultwarden
https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-569v-845w-g82p ↗
Cross-Org Group Binding Enables Unauthorized Read And Write Access Into Another Organization ## Summary Vaultwarden does not enforce that: - a `groups_users.users_organizations_uuid` entry belongs to the same organization as `groups.groups_uuid`, or - a `collections_groups.collections_uuid` entry belongs to the same organization as `collections_groups.groups_uuid`. Multiple organization group-management endpoints accept arbitrary `MembershipId` and `CollectionId` values and persist them directly without verifying org consistency. Separately, core collection/cipher access queries treat group relationships as authoritative based only on: - the current user's `users_organizations.uuid`, and - the linked `groups_users` / `collections_groups` rows, but do not require the linked `groups.organizations_uuid` to match the organization currently being accessed. This lets an attacker who is: - `Admin` in **Organization A**, and - only a low-privileged member in **Organization B** bind their **Org B membership UUID** into an **Org A group**, then use that foreign group relationship to gain unauthorized access to **Org B** vault data. With an `accessAll=true` Org A group, the attacker can make `/api/sync` and `/api/ciphers` enumerate Org B ciphers. Once those unauthorized sync results reveal Org B collection IDs, the attacker can also bind those foreign collection IDs to the Org A group and turn the same flaw into write access over Org B items. This is a real cross-org authorization flaw, not a config issue and not just an audit/UI integrity bug. ## Affected Code ### 1. Group management endpoints accept foreign member IDs and collection IDs without org validation Group create/update forwards attacker-controlled `collections` and `users` directly into `add_update_group()`: - `src/api/core/organizations.rs:2458-2487` - `src/api/core/organizations.rs:2489-2525` Inside `add_update_group()`: - each supplied `CollectionId` is persisted as `CollectionGroup` with no `find_by_uuid_and_org()` check - each supplied `MembershipId` is persisted as `GroupUser` with no `find_by_uuid_and_org()` check Relevant lines: - `src/api/core/organizations.rs:2528-2545` The standalone member-replacement endpoint has the same problem: - `src/api/core/organizations.rs:2701-2738` ### 2. The DB schema only enforces foreign keys, not same-org consistency The group support migrations only require that: - `groups_users.groups_uuid` references some group - `groups_users.users_organizations_uuid` references some membership - `collections_groups.collections_uuid` references some collection - `collections_groups.groups_uuid` references some group But there is no composite constraint enforcing that those rows belong to the same organization. Examples: - `migrations/postgresql/2022-07-27-110000_add_group_support/up.sql:11-23` - `migrations/sqlite/2022-07-27-110000_add_group_support/up.sql:11-23` - `migrations/mysql/2022-07-27-110000_add_group_support/up.sql:11-23` ### 3. Cipher enumeration trust Affected packages: rust:vaultwarden Patched: vaultwarden 1.35.5