VulnWatch by ve1ve2
medium 5.5

GHSA-88qc-6ch9-mc3j: Directory-connector member import (ldap_import) skips org-policy enforcement (check_user_allowed), bypassing the Single-Organization and required-2FA policies

Source:
Vaultwarden releases + advisories (GitHub dani-garcia/vaultwarden)
Published:
Fetched:
Updated:
Affects:
dani-garcia vaultwarden

https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-88qc-6ch9-mc3j ↗

repo-advisoryrustCWE-862securityrepo:dani-garcia/vaultwarden

Directory-connector member import (ldap_import) skips org-policy enforcement (check_user_allowed), bypassing the Single-Organization and required-2FA policies ## Summary The directory-connector / bulk member-import endpoint `POST /api/public/organization/import` (`src/api/core/public.rs`, `ldap_import`) activates and re-activates organization members **without calling `OrgPolicy::check_user_allowed`** — the policy gate that every interactive membership-activation path applies. A member admitted or re-admitted through directory sync is therefore never checked against the organization's **Single-Organization** or **required-2FA** policies. This is the one activation path missed by the fix for #1849. ## Relationship to prior art (a precise incomplete-fix residual, not a rediscovery) - **#1849** ("org two-step-login policy enforcement doesn't work", CLOSED) is the fix this residual belongs to: it added `OrgPolicy::check_user_allowed` to the interactive membership-activation paths. **This report is the one activation path that fix missed** — the directory-connector import. - A separate report of mine is the **sibling instance of the same pattern** — "a check present on the primary path, absent on an alternate path." The two together motivate a systemic audit of alternate entrypoints (see last section). - **#6780** ("SSO user bypasses org 2FA", OPEN) is an acknowledged **same-class** bypass on a **different** path, confirming the maintainer treats this enforcement area as live. - A refresh-token / security-stamp advisory is **distinct** — a membership revoke does not rotate the security stamp, so it does not cover this scenario (confirmed empirically on 1.36.0). ## Affected versions - `1.36.0` and earlier — confirmed on 1.36.0. - Fixed in `1.37.0`: `ldap_import` now calls `OrgPolicy::check_user_allowed` after `restore()` and re-revokes members the policy disallows. - The `check_user_allowed` enforcement (added for #1849) covers the interactive activation paths but was never added to the public-import path. ## Root cause Issue #1849 was fixed by adding `OrgPolicy::check_user_allowed` to the membership-activation paths — `_confirm_invite` (`organizations.rs:1427`), `restore_member_impl` (`organizations.rs:2402`), `accept_org_invite`, `edit_member`, and the admin path. `check_user_allowed` (`src/db/models/org_policy.rs:283`) enforces **both** the Single-Organization policy and the required-2FA policy. The directory-connector import endpoint `POST /api/public/organization/import` (`src/api/core/public.rs`, `ldap_import`) was missed: it re-Confirms a revoked member via `member.restore()` (~`public.rs:87`) **without calling `check_user_allowed`**. (New members are created as `Accepted` (~`public.rs:107-110`) and would still be checked at the admin `confirm` step; the airtight bypass is the `restore()` → `Confirmed` path, which skips `confirm` entirely.) ## Impact ### Primary — Single-Organization policy bypass (needs no 2FA at all) A member who should be blocked/removed by the Single-Org policy is silently re-Confirmed via directory-connector import, b Affected packages: rust:vaultwarden Patched: vaultwarden 1.37.0

Linked vulnerabilities (1)

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:N

Directory-connector member import (ldap_import) skips org-policy enforcement (check_user_allowed), bypassing the Single-Organization and required-2FA policies

CWE: CWE-862