GHSA-xwf8-pjh7-h589: Cross-organization full cipher access via unguarded full-access-group query
- Published:
- Fetched:
- Updated:
- Affects:
- dani-garcia vaultwarden
https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-xwf8-pjh7-h589 ↗
Cross-organization full cipher access via unguarded full-access-group query # GitHub Security Advisory (vaultwarden) Split out from the original report, which grouped two primary issues plus a supporting set. The SSRF and the `post_org_import` gate are tracked separately, see the note at the end. - **Ecosystem / package:** Rust / self-hosted server - `dani-garcia/vaultwarden`. - **Affected versions:** 1.27.0 through 1.36.0. - **Patched versions:** 1.37.0. ## Title Cross-org full-access authorization gap in vaultwarden ## Severity **AUTHZ (cross-org full access) - Medium.** Reporter's suggested CVSS v3.1 `AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N` (~7.0, but gated on the non-default `org_groups_enabled` + knowing target UUIDs -> Medium in practice). Assigned as `AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N` (5.9), matching the reporter's own "Medium in practice" assessment; `S:U` because both orgs sit under the same authorization component, and `C:L` because the attacker obtains ciphertext they cannot decrypt without the org key. ## CWEs CWE-863 / CWE-639 (incorrect authorization / IDOR), CWE-862 (missing authorization). ## Summary vaultwarden is an internet-exposed, multi-tenant server. An authenticated user who is Admin/Owner of any organization (any user can create one unless `ORG_CREATION_USERS` restricts it) can: **Cross-organization full cipher access.** `edit_member` / `send_invite` (`src/api/core/organizations.rs:1606` / `:1162` in 1.36.0) bind body-supplied group UUIDs to a member with no `Group::find_by_uuid_and_org` check (unlike the collections loop and `put_group_members`), planting a cross-org `groups_users` row. Then `Group::is_in_full_access_group` (`src/db/models/group.rs:261`) - the query behind `Cipher::get_access_restrictions` - lacks the `groups.organizations_uuid == users_organizations.org_uuid` guard its sibling `get_orgs_by_user_with_full_access` (`group.rs:243`) has, so that stray row grants full read/write/manage on a foreign org's ciphers to a non-member. Requires `org_groups_enabled=true` (non-default) and knowing target group + cipher UUIDs (no enumeration). ## Proof of concept Source-only, offline, provided privately: - `poc/poc_authz_cross_org_full_access.py` - SQLite repro of the two Diesel queries: the unguarded `is_in_full_access_group` grants a non-member cross-org full access, the guarded sibling denies it on identical data. (`RESULT_authz_cross_org.txt`) ## Impact An authenticated user who is Admin/Owner of any organization (with the groups feature enabled) can gain full read/write/manage on specific ciphers of an organization they are not a member of. Vault contents remain client-side encrypted throughout. ## Remediation Add the org-match join guard to `Group::is_in_full_access_group` (matching `get_orgs_by_user_with_full_access`) and validate group-org in `edit_member`/`send_invite`. Both were applied in 1.37.0. ## Split-out issues The original report also covered, and the reporter is credited as a finder on both: - Unauthenticated f Affected packages: rust:vaultwarden Patched: vaultwarden 1.37.0