CVE-2022-41952 Uncontrolled Resource Consumption in Matrix Synapse
Attackers can cause excessive resource consumption and long-lived connections by posting streaming media URLs to large rooms, impacting Matrix Synapse servers.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-41952?
CVE-2022-41952 is a medium-severity denial of service vulnerability in matrix-org synapse, published on 22 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Synapse before 1.52.0 with URL preview functionality enabled will attempt to generate URL previews for media stream URLs without properly limiting connection time. Connections will only be terminated after `max_spider_size` (default: 10M) bytes have been downloaded, which can in some cases lead to long-lived connections towards the streaming media server (for instance, Icecast). This can cause excessive traffic and connections toward such servers if their stream URL is, for example, posted to a large room with many Synapse instances with URL preview enabled. Version 1.52.0 implements a timeout mechanism which will terminate URL preview connections after 30 seconds. Since generating URL previews for media streams is not supported and always fails, 1.53.0 additionally implements an allow list for content types for which Synapse will even attempt to generate a URL preview. Upgrade to 1.53.0 to fully resolve the issue. As a workaround, turn off URL preview functionality by setting `url_preview_enabled: false` in the Synapse configuration file.
Which versions are affected by CVE-2022-41952?
3 open source packages ship an affected version, including matrix-synapse. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
matrix-synapse PyPI | All versions | 1.53.0 |
matrix-synapse PyPI | All versions | 1.53.0 |
matrix-synapse PyPI | All versions | 1.53.0 |
Products include Matrix Synapse.
How do I fix CVE-2022-41952?
Upgrade matrix-synapse to 1.53.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2022-41952 being exploited?
There is no known exploitation of CVE-2022-41952 in the wild and no public exploit code.
Other vulnerabilities in matrix-org synapse
- CVE-2019-18835 Improper Verification of Cryptographic Signature in matrix-synapse
- CVE-2024-52815 Synapse allows a a malformed invite to break the invitee's `/sync`
- CVE-2024-52805 Synapse allows unsupported content types to lead to memory exhaustion
- CVE-2024-53863 Synapse can be forced to thumbnail unexpected file formats, invoking external, potentially untrustworthy decoders
- CVE-2024-37302 Synapse denial of service through media disk space consumption
Sources
Also known as GHSA-4822-jvwx-w47h, PYSEC-2026-663, UBUNTU-CVE-2022-41952.