// For flags

CVE-2021-41281

Path traversal in Matrix Synapse

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Synapse es un paquete para servidores domésticos Matrix escrito en Python 3/Twisted. En versiones anteriores a 1.47.1, las instancias de Synapse con el repositorio de medios habilitado pueden ser engañadas para descargar un archivo de un servidor remoto en un directorio arbitrario. No es requerida autenticación para el endpoint afectado. Los dos últimos directorios y el nombre del archivo de la ruta son elegidos al azar por Synapse y no pueden ser controlados por un atacante, lo que limita el impacto. Los servidores domésticos con el repositorio de medios deshabilitado no están afectados. Los servidores domésticos con una lista blanca de la federación tampoco están afectados, ya que Synapse comprobará el nombre de host remoto, incluyendo el final "../", con la lista blanca. Los administradores de servidores deben actualizar a la versión 1.47.1 o posterior. Los administradores de servidores que usen un proxy inverso podrían, a costa de perder la funcionalidad de los medios de comunicación, bloquear ciertos endpoints como solución. Como alternativa, los despliegues sin contenedores pueden adaptarse para usar la configuración systemd endurecida

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
Attack Vector
Network
Attack Complexity
Medium
Authentication
None
Confidentiality
None
Integrity
Partial
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2021-09-15 CVE Reserved
  • 2021-11-23 CVE Published
  • 2024-08-04 CVE Updated
  • 2024-08-08 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Matrix
Search vendor "Matrix"
Synapse
Search vendor "Matrix" for product "Synapse"
< 1.47.1
Search vendor "Matrix" for product "Synapse" and version " < 1.47.1"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
34
Search vendor "Fedoraproject" for product "Fedora" and version "34"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
35
Search vendor "Fedoraproject" for product "Fedora" and version "35"
-
Affected