CVE-2021-39164: Improper Authorization in matrix-synapse allows disclosure of room membership
Summary
CVE-2021-39164: Improper authorisation of members discloses room membership to non-members. Affects matrix-synapse versions < 1.41.1. Fixed in 1.41.1. How to fix ↓
Also tracked for
- matrix-synapse · Debian:13
The same CVE-2021-39164 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
matrix-synapse is an open-source server implementation of the Matrix protocol, which enables secure and decentralized communication. It provides a platform for real-time messaging, file sharing, and voice and video calls. The vulnerability affects matrix-synapse versions prior to 1.41.1 and is related to the authorization mechanism for room membership.
Vulnerability Detail
The vulnerability in matrix-synapse allows unauthorized users to access the membership of a room, including the list of members and their display names. This disclosure of room membership is possible if the unauthorized user knows the ID of the room and is using an account on a vulnerable homeserver that is part of the room. The vulnerability is limited to rooms with shared history visibility. The impact of this vulnerability is considered low, as it requires specific conditions for exploitation.
How To Fix
Latest published version: 1.163.0 as of 22 Oct 2026
pip install --upgrade "matrix-synapse==1.163.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.41.1
This is the first release that contains the fix.
pip install --upgrade "matrix-synapse==1.41.1"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Administrators of servers that use a reverse proxy can implement a workaround by blocking specific endpoints. The following endpoints should be blocked with the 'at' query parameter:
- /_matrix/client/r0/rooms/{room_id}/members
- /_matrix/client/unstable/rooms/{room_id}/members However, implementing this workaround may result in a loss of functionality and is not recommended unless necessary.
Conclusion
The vulnerability in matrix-synapse allows unauthorized users to access room membership information in specific conditions. Server administrators should upgrade to version 1.41.1 or later to fix the vulnerability. Implementing the recommended patches or upgrading to the latest version ensures the proper authorization of room membership. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for matrix-synapse →
FAQ
The impact of this vulnerability is limited to unauthorized users being able to access the membership of a room, including the list of members and their display names. However, specific conditions must be met for exploitation, such as knowing the room ID and having an account on a vulnerable homeserver that is part of the room.
Versions of matrix-synapse prior to 1.41.1 are affected by this vulnerability. It is recommended to upgrade to the latest version to mitigate the issue.
No, only rooms with shared history visibility are vulnerable to this issue. Rooms with other visibility settings are not affected.
No, the vulnerability requires the unauthorized user to have an account on a vulnerable homeserver that is part of the room. Remote exploitation is not possible.
There are no known public exploits for this vulnerability at the time of this advisory. However, it is important to apply the recommended patches or upgrade to the latest version to prevent any potential exploitation.
References
Related vulnerabilities
Recent vulnerabilities recorded for matrix-synapse.