{"id":"CVE-2022-31052","aliases":["GHSA-22p3-qrh9-cx32","PYSEC-2022-224"],"url":"https://o3.security/vulnerability/CVE-2022-31052","summary":"URL previews can crash Synapse media repositories or Synapse monoliths","details":"### Impact\n\nURL previews of some web pages can exhaust the available stack space for the Synapse process due to unbounded recursion.\nThis is sometimes recoverable and leads to an error for the request causing the problem, but in other cases the Synapse process may crash altogether.\n\nIt 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.\nRemote users are not able to exploit this directly, because [the URL preview endpoint is authenticated](https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3preview_url).\n\n### Am I affected?\n\n* deployments with `url_preview_enabled: false` set in configuration are not affected.\n* deployments with `url_preview_enabled: true` set in configuration **are** affected.\n* deployments with no configuration value set for `url_preview_enabled` are not affected, because the default is `false`.\n\n### Patches\n\nAdministrators of homeservers with URL previews enabled are advised to upgrade to v1.61.1 or higher.\n\n### Workarounds\n\n* URL previews can be disabled in the configuration file by setting `url_preview_enabled: false`.\n* Deployments using workers can choose to offload URL previews to one or more dedicated worker(s), ensuring that a process crash does not disrupt other functionality of Synapse.\n\n### For more information\n\nIf you have any questions or comments about this advisory, e-mail us at [security@matrix.org](mailto:security@matrix.org).\n","published":"2022-06-28T17:10:11Z","modified":"2026-08-12T03:51:32.768846145Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"matrix-synapse","fixedVersion":"1.61.1"}],"fix":{"url":"https://github.com/matrix-org/synapse/commit/fa1308061802ac7b7d20e954ba7372c5ac292333","label":"matrix-org/synapse@fa13080"},"references":[{"type":"WEB","url":"https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3preview_url"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31052.json"},{"type":"ADVISORY","url":"https://github.com/matrix-org/synapse/security/advisories/GHSA-22p3-qrh9-cx32"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7EARKKJZ2W7WUITFDT4EG4NVATFYJQHF/"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QGSDQ4YAITCUACAB7SXQZDJIU3IQ4CJD/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31052"},{"type":"FIX","url":"https://github.com/matrix-org/synapse/commit/fa1308061802ac7b7d20e954ba7372c5ac292333"},{"type":"PACKAGE","url":"https://github.com/matrix-org/synapse"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2022-224.yaml"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7EARKKJZ2W7WUITFDT4EG4NVATFYJQHF"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGSDQ4YAITCUACAB7SXQZDJIU3IQ4CJD"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:32.768846145Z"}}