CVE-2022-41952 Uncontrolled Resource Consumption in Matrix Synapse

Medium 6.5 Published Updated

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.

Weakness: CWE-772, CWE-400

Which versions are affected by CVE-2022-41952?

3 open source packages ship an affected version, including matrix-synapse. It affects 1 product.

PackageAffectedFixed in
matrix-synapse PyPIAll versions1.53.0
matrix-synapse PyPIAll versions1.53.0
matrix-synapse PyPIAll versions1.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.

Sources

Also known as GHSA-4822-jvwx-w47h, PYSEC-2026-663, UBUNTU-CVE-2022-41952.

Is CVE-2022-41952 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free