GHSA-64mc-4p6f-r7x9: Revoked or unconfirmed organization Admin can read cipher audit logs
- Published:
- Fetched:
- Updated:
- Affects:
- dani-garcia vaultwarden
https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-64mc-4p6f-r7x9 ↗
Revoked or unconfirmed organization Admin can read cipher audit logs ## Summary `GET /api/ciphers//events` returns an organization cipher's audit log to any authenticated user whose membership row carries `atype` Owner or Admin, **regardless of membership status**. A member who was invited but never confirmed, or who was confirmed and later revoked, keeps indefinite read access to that cipher's access history: who viewed, edited, copied or autofilled the credential, when, from which IP and device type. The two sibling event endpoints in the same file are guarded correctly. This one is not. Requires `ORG_EVENTS_ENABLED=true`, which is not the default. ## Affected 1.37.3 (current release) and `main` at commit `25dfedaf` (2026-09-09). Verified on both. ## Root cause `src/api/core/events.rs` has three event endpoints. Two require `AdminHeaders`: ```rust :34 async fn get_org_events(..., headers: AdminHeaders, ...) // organization events :92 async fn get_user_events(..., headers: AdminHeaders, ...) // per member events :66 async fn get_cipher_events(..., headers: Headers, ...) // per cipher events ``` `AdminHeaders` resolves through `is_confirmed_and_admin()` at `src/auth.rs:725`: ```rust fn is_confirmed_and_admin(&self) -> bool { self.membership_status == MembershipStatus::Confirmed && self.membership_type >= MembershipType::Admin } ``` `get_cipher_events` instead takes the generic `Headers` guard, which only proves a valid user JWT, and hand rolls its own check via `Membership::user_has_ge_admin_access_to_cipher` at `src/db/models/organization.rs:1105`: ```rust users_organizations::table .inner_join(ciphers::table.on(ciphers::uuid.eq(cipher_uuid) .and(ciphers::organization_uuid.eq(users_organizations::org_uuid.nullable())))) .filter(users_organizations::user_uuid.eq(user_uuid)) .filter(users_organizations::atype.eq_any(vec![MembershipType::Owner as i32, MembershipType::Admin as i32])) ``` That reproduces the `membership_type >= Admin` half of `is_confirmed_and_admin` and drops the `membership_status == Confirmed` half. Every other membership query in `organization.rs` states the invariant in its own name and enforces it: `find_confirmed_by_user`, `find_confirmed_by_user_and_org`, `find_confirmed_by_org`, `find_confirmed_and_manage_all_by_org`, `count_confirmed_by_org_and_type`, `find_by_user_and_policy`. The one function that deliberately omits it is named `find_any_state_by_user`. `user_has_ge_admin_access_to_cipher` omits it without saying so. Upstream Bitwarden gates the equivalent endpoint with the same check it uses for organization events (`src/Api/Dirt/Controllers/EventsController.cs`, `AccessEventLogs`). The comment at `src/api/core/events.rs:32` cites that controller as the reference implementation. ## Steps to Reproduce ``` docker run -d --name vw-repro \ -e ORG_EVENTS_ENABLED=true -e SIGNUPS_ALLOWED=true \ -e I_REALLY_W Affected packages: rust:vaultwarden Patched: vaultwarden 1.37.4