CVE-2021-39163: Adding a private/unlisted room to a community exposes room metadata in an unauthorised manner.
Impact Unauthorised users can access the name, avatar, topic and number of members of a room if they know the ID of the room. This vulnerability is limited to homeservers where: - the vulnerable homeserver is in the room; and - untrusted users are permitted to create groups (communities).
By default, only homeserver administrators can create groups. However, homeserver administrators can already access this information in the database or using the admin API. As a result, only homeservers where the configuration setting enablegroupcreation has been set to true are impacted.
Patches Server administrators should upgrade to 1.41.1 or higher.
Workarounds Server administrators can set enablegroupcreation to false in their homeserver configuration (this is the default value) to prevent creation of groups by non-administrators.
Administrators that are using a reverse proxy could, with partial loss of group functionality, block the following endpoints: /matrix/client/r0/groups/{groupid}/rooms /matrix/client/unstable/groups/{groupid}/rooms
References n/a
For more information If you have any questions or comments about this advisory, e-mail us at security@matrix.org.
Other sources
Matrix is an ecosystem for open federated Instant Messaging and Voice over IP. In versions 1.41.0 and prior, unauthorised users can access the name, avatar, topic and number of members of a room if they know the ID of the room. This vulnerability is limited to homeservers where the vulnerable homeserver is in the room and untrusted users are permitted to create groups (communities). By default, only homeserver administrators can create groups. However, homeserver administrators can already access this information in the database or using the admin API. As a result, only homeservers where the configuration setting enablegroupcreation has been set to true are impacted. Server administrators should upgrade to 1.41.1 or higher to patch the vulnerability. There are two potential workarounds. Server administrators can set enablegroupcreation to false in their homeserver configuration (this is the default value) to prevent creation of groups by non-administrators. Administrators that are using a reverse proxy could, with partial loss of group functionality, block the endpoints /matrix/client/r0/groups/{groupid}/rooms and /matrix/client/unstable/groups/{groupid}/rooms.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/matrix-synapseto a version that resolves this vulnerability.Fixed in 1.41.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.41.1 - Configuration
Set `enable_group_creation` to `false` in the homeserver configuration to prevent group (community) creation by non-administrators (this is the default value).
Matrix homeserver enable_group_creation = false - Compensating control
If using a reverse proxy, block the endpoints `/_matrix/client/r0/groups/{group_id}/rooms` and `/_matrix/client/unstable/groups/{group_id}/rooms` to mitigate exposure of room metadata, noting this may cause partial loss of group functionality.
Event History
Frequently Asked Questions
What is CVE-2021-39163?
CVE-2021-39163 is a vulnerability in Matrix Synapse, an ecosystem for open federated Instant Messaging and Voice over IP, where unauthorised users can access certain information of a room if they know the room ID.
What is the severity of CVE-2021-39163?
The severity of CVE-2021-39163 is low, with a CVSS severity score of 3.1.
How can unauthorised users access room information in CVE-2021-39163?
Unauthorised users can access the name, avatar, topic, and number of members of a room if they know the ID of the room.
Which software versions are affected by CVE-2021-39163?
Versions 1.41.0 and prior of Matrix Synapse and Fedora 34 and Fedora 35 are affected by CVE-2021-39163.
How do I fix CVE-2021-39163?
To fix CVE-2021-39163, upgrade to version 1.41.1 of Matrix Synapse.