CVE-2021-39163: Matrix synapse Adding A Private/unlisted Room To Vulnerability
LOWCVE-2021-39163 is a LOW (CVSS 3.1) adding a private/unlisted room to vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Matrix synapse libraries in the PyPI ecosystem. The issue involves adding a private/unlisted room to a community exposes room metadata in an unauthorised manner.. Remediation is available by upgrading affected packages to version 1.41.1.
CVE-2021-39163 at a Glance
Security Impact
CVSS: 3.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2021-39163
To remediate this vulnerability, upgrade all affected Matrix synapse dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install matrix-synapse>=1.41.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show matrix-synapse
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-39163, inspect your installed packages using pip:
pip show matrix-synapse
Analyze the terminal output to locate any version of Matrix synapse in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.41.1), your application is affected.
Note: The pip show matrix-synapse command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Matrix synapse, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-39163 Affected Matrix synapse Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
matrix-synapse
|
PyPI |
< 1.41.1
|
1.41.1
|
References
Frequently Asked Questions
What is CVE-2021-39163?
Which Matrix synapse versions are affected?
What version fixes CVE-2021-39163?
Is matrix-synapse affected?
What is the CVSS score of CVE-2021-39163?
What CWE is associated with CVE-2021-39163?
How can I check PyPI dependencies for CVE-2021-39163?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jj53-8fmw-f2w2",
"modified" : "2024-09-24T15:37:56Z",
"published" : "2021-09-01T18:25:44Z",
"aliases" : [ "CVE-2021-39163" ],
"summary" : "Adding a private/unlisted room to a community exposes room metadata in an unauthorised manner.",
"details" : "### Impact\nUnauthorised 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:\n- the vulnerable homeserver is in the room; and\n- untrusted users are permitted to create groups (communities).\n\nBy 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 `enable_group_creation` has been set to `true` are impacted.\n\n### Patches\nServer administrators should upgrade to 1.41.1 or higher.\n\n### Workarounds\nServer administrators can set `enable_group_creation` to `false` in their homeserver configuration (this is the default value) to prevent creation of groups by non-administrators.\n\nAdministrators that are using a reverse proxy could, with partial loss of group functionality, block the following endpoints:\n* `/_matrix/client/r0/groups/{group_id}/rooms`\n* `/_matrix/client/unstable/groups/{group_id}/rooms`\n\n### References\nn/a\n\n### For more information\nIf you have any questions or comments about this advisory, e-mail us at security@matrix.org.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "matrix-synapse"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.41.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/security/advisories/GHSA-jj53-8fmw-f2w2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-39163"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/commit/cb35df940a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matrix-org/synapse"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/releases/tag/v1.41.1"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-424.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2VHDEPCZ22GJFMZCWA2XZAGPOEV72POF"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PXT7ID7DNBRN2TVTETU3SYQHJKEG6PXN"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-31T17:46:08Z",
"nvd_published_at" : "2021-08-31T16:15:00Z"
}
}