{"id":"CVE-2022-31052","published":"2022-06-28T17:10:11Z","modified":"2025-04-23T18:05:56Z","title":"URL previews can crash Synapse media repositories or Synapse monoliths","vendor":"matrix-org","product":"synapse","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01686,"percentile":0.7759,"provenance":"source"},"cwes":[{"id":"CWE-674","name":"Uncontrolled Recursion"}],"references":[{"url":"https://github.com/matrix-org/synapse/security/advisories/GHSA-22p3-qrh9-cx32","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/matrix-org/synapse/commit/fa1308061802ac7b7d20e954ba7372c5ac292333","tags":["x_refsource_MISC"]},{"url":"https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3preview_url","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7EARKKJZ2W7WUITFDT4EG4NVATFYJQHF/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QGSDQ4YAITCUACAB7SXQZDJIU3IQ4CJD/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"priority":{"score":20.1,"factors":[{"name":"EPSS percentile","points":15.52},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"matrix-org","affectedVersions":[{"vendor":"matrix-org","product":"synapse","versions":["< 1.61.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T14:04:10.584775Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"matrix-synapse","vulnerableRanges":["<1.61.1"],"patched":["1.61.1"],"from":["GHSA-22p3-qrh9-cx32","PYSEC-2022-224"],"provenance":"source"}],"summary":{"text":"URL previews in the Synapse homeserver for the Matrix network, prior to version 1.61.1, can exhaust the process's stack space through unbounded recursion when processing certain web pages, which can crash the Synapse process or cause the request to fail. An attacker with an authenticated account on the homeserver, or a remote user sending a URL that a local client automatically previews, can trigger this, but only on deployments where url_preview_enabled is set to true, since the endpoint is authenticated and remote users cannot exploit it directly.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:12Z"},"euvd":{"id":"EUVD-2022-0153","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-39164","published":"2021-08-31","fixed":"1.41.1","kev":false},{"cve":"CVE-2021-41281","published":"2021-11-23","fixed":"1.47.1","kev":false},{"cve":"CVE-2022-41952","published":"2022-11-22","fixed":"1.53.0","kev":false},{"cve":"CVE-2022-31052","published":"2022-06-28","fixed":"1.61.1","kev":false},{"cve":"CVE-2022-31152","published":"2022-09-02","fixed":"1.62.0","kev":false,"link":{"from":"CVE-2022-31052","to":"CVE-2022-31152","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:matrix-synapse","fromFixed":"1.61.1","toFixed":"1.62.0rc1","daysApart":66}]}},{"cve":"CVE-2022-39374","published":"2023-05-26","fixed":"1.68.0","kev":false},{"cve":"CVE-2022-39335","published":"2023-05-26","fixed":"1.69.0","kev":false}],"package":"PyPI:matrix-synapse"}}