Excessive Connection Vulnerability in Matrix Synapse URL Preview Functionality

matrix-synapse Updated 02 Oct 2025

Summary

22/11/2022
N/A
Yes i
Medium
5.3

CVE-2022-41952: 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. Affects matrix-synapse across 2 version ranges.

< 1.53.0-1 < 551dd8c9f8d10681dc535ec43d652bbadf60de48

Fixed in 1.53.0-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Matrix Synapse is an open-source server for the Matrix protocol, enabling real-time communication. It supports various features, including URL previews, which allow users to see a preview of linked content. However, a vulnerability exists in versions prior to 1.53.0, where the URL preview functionality can lead to excessive connections to media streaming servers, potentially causing service disruptions.

Vulnerability Detail

The vulnerability arises from the URL preview functionality in Synapse versions before 1.53.0. When enabled, Synapse attempts to generate previews for media stream URLs without properly limiting the connection time. Connections remain active until a maximum data size is reached, which can lead to prolonged connections to streaming media servers, such as Icecast. This behavior can result in excessive traffic and strain on the server, especially in large rooms with multiple Synapse instances. The issue is addressed in version 1.53.0, which introduces a timeout mechanism to terminate connections after 30 seconds and an allow list for content types to prevent unnecessary preview attempts.

How To Fix

Minimum fixed version

1.53.0-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade matrix-synapse

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can disable the URL preview functionality by adding the following line to your Synapse configuration file:

url_preview_enabled: false

Conclusion

The vulnerability in Matrix Synapse's URL preview functionality poses a risk of excessive connections to media streaming servers, which can lead to service disruptions. Upgrading to version 1.53.0 or later is essential to mitigate this risk. Additionally, disabling URL previews can serve as a temporary workaround while a permanent fix is implemented.

See every vulnerability recorded for matrix-synapse →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.3, indicating a moderate level of severity.

Versions of Matrix Synapse prior to 1.53.0 are affected by this vulnerability.

If exploited, this vulnerability can lead to excessive traffic and connections to media streaming servers, potentially causing service disruptions.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

Vulert is a service that monitors and alerts for open-source vulnerabilities in software using a manifest file like package-lock.json, providing real-time insights into potential risks.

Related vulnerabilities

Recent vulnerabilities recorded for matrix-synapse.

How To Fix

Minimum fixed version

1.53.0-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade matrix-synapse

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback