Skip to content
OpenAdvisories
High · 7.5 CVE-2021-41281 EUVD-2021-0133GHSA-3hfw-x7gx-437cPYSEC-2021-436

Path traversal in Matrix Synapse

Published Nov 23, 2021 · Updated Aug 4, 2024 · Assigned by GitHub_M

Description

Synapse is a package for Matrix homeservers written in Python 3/Twisted. Prior to version 1.47.1, 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 2 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, including the trailing `../`s, against the whitelist. Server administrators should upgrade to 1.47.1 or later. Server administrators using a reverse proxy could, at the expense of losing media functionality, may block the certain endpoints as a workaround. Alternatively, non-containerized deployments can be adapted to use the hardened systemd config.

Affected products

VendorProductAffectedFixed
matrix-org synapse < 1.47.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS matrix-synapse No fix yet —
Ubuntu Pro 20.04 LTS matrix-synapse No fix yet —
Ubuntu Pro 18.04 LTS matrix-synapse No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed matrix-synapse 1.47.1-1.1 openSUSE-SU-2024:11649-1
ReleasePackageFixed inAdvisory
Alpine v3.24 synapse 1.47.1-r0 —
Alpine v3.23 synapse 1.47.1-r0 —
Alpine v3.22 synapse 1.47.1-r0 —
Alpine v3.21 synapse 1.47.1-r0 —
Alpine v3.20 synapse 1.47.1-r0 —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 synapse 1.47.1-r0 —
Alpine v3.18 synapse 1.47.1-r0 —
Alpine v3.17 synapse 1.47.1-r0 —
Alpine v3.16 synapse 1.47.1-r0 —
Alpine v3.15 synapse 1.47.1-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI matrix-synapse < 1.47.1 1.47.1 GHSA-3hfw-x7gx-437c

Advisories 1

References