CVE-2022-31052
CVE-2022-31052 is a medium-severity vulnerability in Matrix Synapse with a CVSS 3.x base score of 6.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-674.
Key facts
- Severity: Medium (CVSS 3.x base score 6.5)
- CVSS v2: 3.5
- EPSS exploit prediction: 2% (73rd percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-674
- Affected product: Matrix Synapse
- Published:
- Last modified:
Description
Synapse is an open source home server implementation for the Matrix chat network. In versions prior to 1.61.1 URL previews of some web pages can exhaust the available stack space for the Synapse process due to unbounded recursion. This is sometimes recoverable and leads to an error for the request causing the problem, but in other cases the Synapse process may crash altogether. It is possible to exploit this maliciously, either by malicious users on the homeserver, or by remote users sending URLs that a local user's client may automatically request a URL preview for. Remote users are not able to exploit this directly, because the URL preview endpoint is authenticated. Deployments with `url_preview_enabled: false` set in configuration are not affected. Deployments with `url_preview_enabled: true` set in configuration **are** affected. Deployments with no configuration value set for `url_preview_enabled` are not affected, because the default is `false`. Administrators of homeservers with URL previews enabled are advised to upgrade to v1.61.1 or higher. Users unable to upgrade should set `url_preview_enabled` to false.
Frequently asked questions
- What is CVE-2022-31052?
- Synapse is an open source home server implementation for the Matrix chat network. In versions prior to 1.61.1 URL previews of some web pages can exhaust the available stack space for the Synapse process due to unbounded recursion. This is sometimes recoverable and leads to an error for the request causing the problem, but in other cases the Synapse process may crash altogether. It is possible to exploit this maliciously, either by malicious users on the homeserver, or by remote users sending URLs that a local user's client may automatically request a URL preview for. Remote users are not able to exploit this directly, because the URL preview endpoint is authenticated. Deployments with `url_preview_enabled: false` set in configuration are not affected. Deployments with `url_preview_enabled: true` set in configuration **are** affected. Deployments with no configuration value set for `url_preview_enabled` are not affected, because the default is `false`. Administrators of homeservers with URL previews enabled are advised to upgrade to v1.61.1 or higher. Users unable to upgrade should set `url_preview_enabled` to false.
- How severe is CVE-2022-31052?
- CVE-2022-31052 has a CVSS 3.x base score of 6.5, rated medium severity. It is exploitable over network with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is none, integrity none, and availability high.
- Is CVE-2022-31052 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 2% (73rd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-31052?
- CVE-2022-31052 primarily affects Matrix Synapse. In total, 3 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2022-31052?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2022-31052 published?
- CVE-2022-31052 was published on 2022-06-28 and last updated on 2026-06-17.
References
- https://github.com/matrix-org/synapse/commit/fa1308061802ac7b7d20e954ba7372c5ac292333
- https://github.com/matrix-org/synapse/security/advisories/GHSA-22p3-qrh9-cx32
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7EARKKJZ2W7WUITFDT4EG4NVATFYJQHF/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QGSDQ4YAITCUACAB7SXQZDJIU3IQ4CJD/
- https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3preview_url
Affected products (3)
- cpe:2.3:a:matrix:synapse:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
More vulnerabilities in Matrix Synapse
- CVE-2019-18835 — Critical (CVSS 9.8): Matrix Synapse before 1.5.0 mishandles signature checking on some federation APIs. Events sent over /send_join,…
- CVE-2024-53863 — Critical (CVSS 9.1): Synapse is an open-source Matrix homeserver. In Synapse versions before 1.120.1, enabling the dynamic_thumbnails option…
- CVE-2018-16515 — High (CVSS 8.8): Matrix Synapse before 0.33.3.1 allows remote attackers to spoof events and possibly have unspecified other impacts by…
- CVE-2024-52805 — High (CVSS 7.5): Synapse is an open-source Matrix homeserver. In Synapse before 1.120.1, multipart/form-data requests can in certain…
- CVE-2024-37302 — High (CVSS 7.5): Synapse is an open-source Matrix homeserver. Synapse versions before 1.106 are vulnerable to a disk fill attack, where…
- CVE-2021-41281 — High (CVSS 7.5): Synapse is a package for Matrix homeservers written in Python 3/Twisted. Prior to version 1.47.1, Synapse instances…
All CVEs affecting Matrix Synapse →
Other CWE-674 (Uncontrolled Recursion) vulnerabilities
- CVE-2026-43185 — Critical (CVSS 9.8): In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix signededness bug in…
- CVE-2023-51803 — Critical (CVSS 9.8): LinuxServer.io Heimdall before 2.5.7 does not prevent use of icons that have non-image data such as the "<?php ?>"…
- CVE-2021-41752 — Critical (CVSS 9.8): Stack overflow vulnerability in Jerryscript before commit e1ce7dd7271288be8c0c8136eea9107df73a8ce2 on Oct 20, 2021 due…
- CVE-2018-1000618 — Critical (CVSS 9.8): EOSIO/eos eos version after commit f1545dd0ae2b77580c2236fdb70ae7138d2c7168 contains a stack overflow vulnerability in…
- CVE-2025-10728 — Critical (CVSS 9.4): When the module renders a Svg file that contains a <pattern> element, it might end up rendering it recursively leading…
- CVE-2026-40324 — Critical (CVSS 9.1): Hot Chocolate is an open-source GraphQL server. Prior to versions 12.22.7, 13.9.16, 14.3.1, and 15.1.14, Hot…
Browse all CWE-674 (Uncontrolled Recursion) vulnerabilities →