Permissions, Privileges, and Access Controls
mod/chat/chat_ajax.php in Moodle through 2.3.11, 2.4.x before 2.4.9, 2.5.x before 2.5.5, and 2.6.x before 2.6.2 does not properly check for the mod/chat:chat capability during chat sessions, which allows remote authenticated users to bypass intended access restrictions in opportunistic circumstances by remaining in a chat session after an intra-session capability removal by an administrator.
CWE-264 - Permissions Privileges and Access Controls
CWE 264 (permissions, privileges, and access controls) is not a weakness in and of itself, rather it is a category of weaknesses related to the management of permissions, privileges, and other security features used to perform access control. If not addressed, the weaknesses in this category allow attackers to gain privileges for an unintended sphere of control, access sensitive information, and execute arbitrary commands.