/

CVE-2026-57520

Severity:

HIGH RISK

(7.1)

Missing Role Hierarchy Check (CWE-862) in Bitwarden

CVE-2026-57520

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-862

Impact:

Privilege Escalation via Unauthorized Admin Removal

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Bitwarden Server contains an authorization flaw that lets authenticated Custom users with ManageUsers permission remove Admin accounts via a bulk user-removal endpoint.

By bypassing the stricter checks applied to single-user removal, an attacker can submit a crafted bulk DELETE request that strips one or more Admins from an organization.

Affected context

The vulnerability occurs within Bitwarden Server's organization user management APIs, specifically the bulk user-remove endpoint.

It is relevant when organizations use Custom roles with the ManageUsers permission and rely on server-side logic to enforce role hierarchy between Admin and non-Admin accounts.

The issue manifests when the bulk removal path does not consistently apply the same privilege checks as the single-user removal path, leaving a gap in authorization control.

Exploit preconditions

  • Attack surface: Organization user management API exposed by Bitwarden Server.
  • Required access: Authenticated organization membership with a Custom role granting the ManageUsers permission.
  • Trigger point: Submission of a bulk DELETE request to the user-remove endpoint that includes Admin organization-user IDs.
  • Why exploitation is possible: The bulk removal handler omits role hierarchy and authorization checks that are present in the single-user removal path, allowing ManageUsers users to delete Admin accounts they should not control.

Why this happens

This vulnerability stems from inconsistent authorization enforcement across different code paths handling similar operations.

The single-user removal endpoint enforces a role hierarchy guard that prevents lower-privileged roles from removing Admin users, but the bulk user-remove endpoint lacks equivalent checks.

Conceptually, this aligns with CWE-862: Missing Authorization, where a sensitive operation (removal of Admin accounts) is exposed without adequate permission validation based on the user's role and the target's role.

Potential impact

  • Custom users may remove one or more Admin accounts from an organization.
  • Organizations could temporarily lose all Admin users, disrupting governance and configuration management.
  • Attackers can weaken administrative oversight, potentially facilitating further misuse of organization resources.
  • Incident response and audit workflows may be hindered due to unexpected removal of key privileged accounts.

General mitigation guidance

Effective mitigation centers on enforcing consistent authorization policies across all endpoints that perform similar actions.

Recommended patterns include:

  • Centralizing role hierarchy and permission checks in reusable authorization layers rather than per-endpoint logic.
  • Applying the same guard conditions for single and bulk operations so that batch actions cannot bypass role constraints.
  • Designing APIs so that lower-privileged roles can only act on accounts at or below their own privilege level.
  • Logging administrative operations and reviewing them regularly to detect anomalous account removal behavior.

How teams detect issues like this

Detection can focus on both code-level signals and runtime behavior:

  • Use static analysis or code review to identify endpoints that modify user roles or membership without invoking shared authorization mechanisms.
  • Look for bulk or batch operations that lack explicit checks on both the acting user's role and the target users' roles.
  • Implement audit logging for all user removal actions, then monitor for patterns where non-Admin roles remove Admin accounts.
  • Employ policy enforcement tools or middleware that validates role hierarchy before allowing any user-management operation to proceed.

Sources

SourceLink
github.comgithub.com/bitwarden/server/commit/901bb67157c0f80d369c40b76742fdf7623da4e4
github.comgithub.com/bitwarden/server/pull/7526
github.comgithub.com/bitwarden/server/releases/tag/v2026.5.0
sanjokkarki.com.npsanjokkarki.com.np/blog/bitwarden-bulk-remove-admin
vulncheck.comvulncheck.com/advisories/bitwarden-server-privilege-escalation-via-bulk-user-remove-endpoint

Frequently asked

questions

No. Exploitation requires an authenticated organization member account with a Custom role that includes the ManageUsers permission.

The attacker must be part of the organization and granted the ManageUsers permission, but they do not need Admin-level access to remove Admin users through the bulk endpoint.

The safest approach is to centralize authorization checks, ensure all endpoints (including bulk operations) consult the same role hierarchy rules, and require that any user-management action validate both actor and target roles.

Adopt a consistent RBAC model enforced via shared middleware or services, mandate code review for sensitive operations like user removal, and use automated tests or policies that verify every management endpoint applies the prescribed authorization checks.

Find out what's already
exploitable in your codebase.