Sanaan Fayaz Wani

dani-garcia/vaultwarden

GHSA-64mc-4p6f-r7x9

Revoked or unconfirmed organization Admin can read cipher audit logs

GHSA-64mc-4p6f-r7x9

4.3

Medium

CVSS 3.1 base

  1. 2026-09-17Reported privately
  2. 41 days later2026-10-28Published by the maintainer

What to do

If you run vaultwarden 1.37.3 and earlier, upgrade to 1.37.4 or later.

Anyone who can reach it over the network, with a low-privilege account and no user interaction, can read some data.Read from the CVSS 3.1 vector

CVSS 3.1 metrics

To exploit it

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None

What it gets

Confidentiality
Low
Integrity
None
Availability
None
Scope
Unchanged

Open this vector in the FIRST calculator ↗

Weakness
CWE-863 Incorrect Authorization
CVE
not assigned
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
2026-09-17Reported privately
41 days
2026-10-28Published by the maintainer

This page reproduces the published advisory for this finding. The advisory of record is linked above.

Affected versions

Package Ecosystem Vulnerable Fixed in
vaultwarden rust <= 1.37.3 1.37.4

Summary

GET /api/ciphers/<cipher_id>/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:

: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:

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:

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_WANT_VOLATILE_STORAGE=true -e ROCKET_PORT=8080 \
  -p 127.0.0.1:8081:8080 vaultwarden/server:1.37.3

repro.py in the attached archive runs both variants end to end and prints a verdict. It needs only the cryptography package.

Variant 1, never confirmed invitee

  1. Alice creates an organization and a cipher in it, then views it once.
  2. Alice invites Bob with type: 1 (Admin). With SMTP disabled his membership is type=1, status=1 (Accepted). He has never been confirmed and holds no organization key.
  3. Bob requests the cipher itself: GET /api/ciphers/<cipher_id> returns HTTP 400.
  4. Bob requests its audit log: GET /api/ciphers/<cipher_id>/events?start=...&end=... returns HTTP 200 with the event list.

Observed:

Bob membership: type=1 status=1  (Accepted, never confirmed, holds no org key)
GET /api/ciphers/{id}          -> HTTP 400   (cipher itself denied)
GET /api/ciphers/{id}/events   -> HTTP 200, 1 events

Variant 2, revoked admin, and the leak is ongoing

  1. Bob is confirmed as Admin and reads the audit log: HTTP 200, 3 events.
  2. Alice revokes him: PUT /api/organizations/<org_id>/users/<member_id>/revoke. His membership becomes type=1, status=-1.
  3. Bob calls GET /api/organizations/<org_id>/users: HTTP 401. Revocation is enforced.
  4. Bob calls the audit log again: HTTP 200, same 3 events.
  5. Bob logs in from scratch while revoked and repeats: HTTP 200, 3 events. Not a stale token.
  6. Alice rotates the credential after the revocation. Bob reads again: the new event is present. This is ongoing visibility, not a stale snapshot.

Observed:

events visible to Bob now: 1
Alice rotates the password AFTER Bob's access should have ended
events visible to Bob now: 2  (delta +1)

Fully removing the member does close the hole, because the membership row is deleted.

Impact

Event records returned include type, actingUserId, date, deviceType and ipAddress (src/db/models/event.rs:178). The type enum (event.rs:71) distinguishes CipherClientViewed, CipherClientToggledPasswordVisible, CipherClientCopiedPassword and CipherClientAutofilled, so per cipher the caller learns which colleague used a shared credential, in what way, from which IP, and when. continuationToken pagination returns full history rather than one page.

actingUserId is a UUID, but anyone who held Admin previously harvested the UUID to email mapping from the member list while they had it.

Cipher contents are not disclosed, and events cannot be forged: post_events_collect requires a confirmed membership or cipher access (events.rs:187, events.rs:207).

The realistic scenario is an offboarded administrator or contractor. Revoke is the documented way to suspend a member while keeping their record, so it is the path an administrator is most likely to take.

Suggested fix

src/db/models/organization.rs:1113

             .filter(users_organizations::user_uuid.eq(user_uuid))
+            .filter(users_organizations::status.eq(MembershipStatus::Confirmed as i32))
             .filter(
                 users_organizations::atype.eq_any(vec![MembershipType::Owner as i32, MembershipType::Admin as i32]),
             )

This restores parity with is_confirmed_and_admin() at src/auth.rs:725 and with find_confirmed_by_user_and_org in the same file.

CVSS and CWE

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N (4.3, Medium)

CWE-863 Incorrect Authorization

The record

Weakness
CWE-863 Incorrect Authorization
Affected
vaultwarden 1.37.3 and earlier
Fixed in
1.37.4
Disclosure
2026-09-17 Reported privately
41 days later2026-10-28 Published
Advisory
GHSA-64mc-4p6f-r7x9

About this writeup

Sanaan Fayaz Wani (GitHub sfwani) reported this vulnerability to the vaultwarden maintainers under coordinated disclosure and is credited as a reporter in GHSA-64mc-4p6f-r7x9, published 2026-10-28.

All published findings: advisory index.