CVE-2023-32682: Matrix synapse Synapse Has Improper Checks For Vulnerability
MODERATECVE-2023-32682 is a MODERATE (CVSS 5.4) synapse has improper checks for vulnerability (CWE-287: Improper Authentication) affecting Matrix synapse libraries in the PyPI ecosystem. The issue involves synapse has improper checks for deactivated users during login. Remediation is available by upgrading affected packages to version 1.85.0.
CVE-2023-32682 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2023-32682
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.85.0
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-2023-32682, 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.85.0), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. 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-2023-32682 Affected Matrix synapse Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
matrix-synapse
|
PyPI |
< 1.85.0
|
1.85.0
|
References
Frequently Asked Questions
What is CVE-2023-32682?
Which Matrix synapse versions are affected?
What version fixes CVE-2023-32682?
Is matrix-synapse affected?
What is the CVSS score of CVE-2023-32682?
What CWE is associated with CVE-2023-32682?
How can I check PyPI dependencies for CVE-2023-32682?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-26c5-ppr8-f33p",
"modified" : "2024-09-24T17:36:26Z",
"published" : "2023-06-06T16:40:42Z",
"aliases" : [ "CVE-2023-32682" ],
"summary" : "Synapse has improper checks for deactivated users during login",
"details" : "### Impact\nIt may be possible for a deactivated user to login when using uncommon configurations.\n\nThis only applies if any of the following are true:\n\n* [JSON Web Tokens are enabled for login](https://matrix-org.github.io/synapse/latest/jwt.html) via the `jwt_config.enabled` configuration setting\n* The [local password database is enabled](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#password_config) via the `password_config.enabled` and `password_config.localdb_enabled` configuration settings *and* a user's password is [updated via an admin API](https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#create-or-modify-account) after a user is deactivated.\n\n**Note that the local password database is enabled by default**, but it is uncommon to set a user's password after they've been deactivated.\n\nInstallations that are configured to only allow login via Single Sign-On (SSO) via CAS, SAML or OpenID Connect (OIDC); or via an external password provider (e.g. LDAP) are not affected.\n\n### Patches\n\n* If using JSON Web Token logins: #15624\n* For other users: #15634\n\n### Workarounds\n\nIf not using JSON Web Tokens, ensure that deactivated users do not have a password set. This list of users can be queried from PostgreSQL:\n\n```sql\nSELECT name FROM users WHERE password_hash IS NOT NULL AND deactivated = 1;\n```\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "matrix-synapse"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.85.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/security/advisories/GHSA-26c5-ppr8-f33p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-32682"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/issues/12274"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/pull/15624"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/pull/15634"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matrix-org/synapse"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/releases/tag/v1.85.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2023-84.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X6DH5A5YEB5LRIPP32OUW25FCGZFCZU2"
}, {
"type" : "WEB",
"url" : "https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#create-or-modify-account"
}, {
"type" : "WEB",
"url" : "https://matrix-org.github.io/synapse/latest/jwt.html"
}, {
"type" : "WEB",
"url" : "https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#password_config"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-06T16:40:42Z",
"nvd_published_at" : "2023-06-06T19:15:11Z"
}
}