CVE-2023-32683: Matrix synapse Synapse Has URL Deny List Vulnerability
MODERATECVE-2023-32683 is a MODERATE (CVSS 3.5) synapse has url deny list vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Matrix synapse libraries in the PyPI ecosystem. The issue involves synapse has url deny list bypass via oembed and image urls when generating previews. Remediation is available by upgrading affected packages to version 1.85.0.
CVE-2023-32683 at a Glance
Security Impact
CVSS: 3.5
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:R/S:U/C:N/I:L/A:N).
How to Fix CVE-2023-32683
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-32683, 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. 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-32683 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-32683?
Which Matrix synapse versions are affected?
What version fixes CVE-2023-32683?
Is matrix-synapse affected?
What is the CVSS score of CVE-2023-32683?
What CWE is associated with CVE-2023-32683?
How can I check PyPI dependencies for CVE-2023-32683?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-98px-6486-j7qc",
"modified" : "2024-09-30T20:34:41Z",
"published" : "2023-06-06T16:41:34Z",
"aliases" : [ "CVE-2023-32683" ],
"summary" : "Synapse has URL deny list bypass via oEmbed and image URLs when generating previews",
"details" : "### Impact\nA discovered oEmbed or image URL can bypass the `url_preview_url_blacklist` setting potentially allowing server side request forgery or bypassing network policies. Impact is limited to IP addresses allowed by the `url_preview_ip_range_blacklist` setting (by default this only allows public IPs) and by the limited information returned to the client:\n\n* For discovered oEmbed URLs, any non-JSON response or a JSON response which includes non-oEmbed information is discarded.\n* For discovered image URLs, any non-image response is discarded.\n\nSystems which have URL preview disabled (via the `url_preview_enabled` setting) or have not configured a `url_preview_url_blacklist` are not affected.\n\nBecause of the uncommon configuration required, the limited information a malicious user, and the amount of guesses/time the attack would need; the severity is rated as low.\n\n### Patches\n\nThe issue is fixed by #15601.\n\n### Workarounds\n\nThe default configuration of the `url_preview_ip_range_blacklist` should protect against requests being made to internal infrastructure, URL previews of public URLs is expected.\n\nAlternately URL previews could be disabled using the `url_preview_enabled` setting.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/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-98px-6486-j7qc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-32683"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/synapse/pull/15601"
}, {
"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-85.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X6DH5A5YEB5LRIPP32OUW25FCGZFCZU2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863", "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-06T16:41:34Z",
"nvd_published_at" : "2023-06-06T19:15:11Z"
}
}