#2023 Password-protected MUC exposure

Reporter MattJ
Owner Nobody
Created
Updated
Stars ★ (1)
Tags
  • Milestone-13.0
  • Status-Fixed
  • Priority-High
  • Type-Defect
  • Security
  1. MattJ on

    **Description** XEP-0045 describes the ability to set a password on MUCs to allow access only to entities which provide the password. This feature is rarely used by modern clients, preferring the more secure "members-only" MUCs instead for private group chats. Because Prosody only checked the password restriction at the time a client tries to join, various other operations which do not require joining the MUC were found to be unprotected in MUCs which are not members-only and restricted access by password only. Two concrete issues have been identified and fixed: 1) A user who was not an occupant and had no affiliation with a room could request a mediated invitation. In non-members-only rooms, the default role was sufficient to permit the request, and password-protected rooms would include the room password in the invitation (as XEP-0045 recommends). However, this allowed any XMPP entity to obtain the password for a room whose address they knew. 2) Message archives of password-protected rooms could be queried without entering the room or proving knowledge of the password. When muc_log_by_default was enabled (the default for mod_muc_mam), anyone who knew the room address could read its history. **Affected configurations** The invite issue affects MUC components with password-protected, non-members-only rooms. The archive issue affects rooms with mod_muc_mam and logging enabled; the default value of muc_log_by_default is true. **Mitigation** Operators who cannot upgrade immediately should make password-protected rooms members-only where possible. Password protected MUCs can be hidden to prevent discoverability (if the MUC address is not easy to guess). Archive exposure can be reduced by disabling MUC logging for password-protected rooms or by switching the MUC to members-only. Disabling mod_muc_mam removes archive query exposure but also removes the feature. Despite the fixes, we strongly recommend that anyone using password-protected MUCs should switch to members-only MUCs instead, and grant access based on the managed access control list which Prosody already provides. Password protection is considered a legacy feature with various inherent problems (e.g. the passwords are exchanged unencrypted), and may be removed in a future version. **Fixes** Mediated invitations are now rejected unless the inviter is an occupant or has an affiliation that permits inviting. Unaffiliated non-occupants are now refused archive queries by default. Because this is potentially a breaking change (some clients may rely on being able to sync history without joining the MUC) the previous open behaviour can be restored with muc_mam_allow_unjoined_queries = true, but password-protected rooms remain restricted. Commits: ede9f5173192, be3eb8c0290b **Attribution** The mediated-invitation password disclosure was identified in an external security review.

  2. MattJ on

    Changes
    • tags Hidden

New comment

Not published. Used for spam prevention and optional update notifications.