SERVER-130261ClosedFixed
dropAllRolesFromDatabase uses malformed cleanup predicates and can leave stale role references that later rebind to recreated roles
h1. Security Context See SECBUG-1278 for problem description, security impact, preconditions, reproduction steps, and severity rationale. h1. Root Cause * src/mongo/db/commands/user_management_commands.cpp: the cleanup filters in dropAllRolesFromDBTxnFn are built as nested plain objects that do not match array elements: ** User-doc cleanup uses filter rolesMatch = \{roles: {db: X}} — this matches a roles field whose value is the document \{"db": X} exactly, not an array element containin