Insufficient capability checks could allow users with the "moodle/site:uploadusers" capability to delete users, without having the necessary "moodle/user:delete" capability. This issue affects moodle versions prior to 3.10.10, 3.11.x prior to 3.11.6, and 4.0.x prior to 4.0.0-rc1.
CWE-287 - Improper Authentication
Improper (or broken) authentication attacks are widespread, and have accounted for many of the worst data breaches in recent years. Improper authentication attacks are a class of vulnerabilities where an attacker impersonates a legitimate user by exploiting weaknesses in either session management or credential management to gain access to the user’s account. This can result in disclosure of sensitive information, and can lead to system compromise, theft, identity theft, and fraud.