PT-2021-23240

CVE-2021-41281

·

Published

2021-11-23

·

Updated

2024-06-15

Description by

CVSS 4.0
8.7
High
MetricsAV: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.
Exploitability
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-3HFW-X7GX-437C
ALT-PU-2021-3630
OPENSUSE-SU-2024:11649-1
PYSEC-2021-436
Found an issue in the description? Have something to add? Feel free to write us 👾