Directory Traversal Affecting synapse package, versions <1.47.1-r0


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.18% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Directory Traversal vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-ALPINE321-SYNAPSE-8489576
  • published6 Dec 2024
  • disclosed23 Nov 2021

Introduced: 23 Nov 2021

CVE-2021-41281  (opens in a new tab)
CWE-22  (opens in a new tab)

How to fix?

Upgrade Alpine:3.21 synapse to version 1.47.1-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream synapse package and not the synapse package as distributed by Alpine. See How to fix? for Alpine:3.21 relevant fixed versions and status.

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.

CVSS Scores

version 3.1