PT-2021-23240 · Synapse+1 · Synapse+1

Squahtx

·

Published

2021-11-23

·

Updated

2024-06-15

·

CVE-2021-41281

CVSS v4.0

8.7

High

VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions Synapse versions prior to 1.47.1
Description Synapse instances with the media repository enabled can be tricked into downloading a file from a remote server into an arbitrary directory. No authentication is required for the affected endpoint. The last two directories and file name of the path are chosen randomly by Synapse and cannot be controlled by an attacker, which limits the impact. Homeservers with the media repository disabled are unaffected. Homeservers with a federation whitelist are also unaffected, since Synapse will check the remote hostname against the whitelist.
Recommendations For versions prior to 1.47.1, upgrade to 1.47.1 or later. As a temporary workaround, server administrators using a reverse proxy can block the following endpoints: / matrix/media/r0/download/{serverName}/{mediaId}, / matrix/media/r0/download/{serverName}/{mediaId}/{fileName}, and / matrix/media/r0/thumbnail/{serverName}/{mediaId}, but this will result in lost media functionality. Alternatively, non-containerized deployments can be adapted to use the hardened systemd config, located at contrib/systemd/override-hardened.conf.

Fix

Path traversal

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALT-PU-2021-3630
CVE-2021-41281
GHSA-3HFW-X7GX-437C
OPENSUSE-SU-2024:11649-1
PYSEC-2021-436

Affected Products

Alt Linux
Synapse