CVE-2021-39164: Improper Authorization in matrix-synapse allows disclosure of room membership

matrix-synapse Updated 02 Oct 2025

Summary

01/09/2021
Yes i
Low
3.1

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for matrix-synapse.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback