CVE-2021-41281 | Path traversal in Matrix Synapse

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.

Published: 2021-11-23 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-41281 is rated Moderate Risk (55.9/100): CVSS High severity, with medium exploitation likelihood (EPSS 1.51%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2021-41281

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.52% 1.51% +0.99%
2 2025-03-30 1.06% 0.52% -0.54%
3 2025-03-29 1.06%

Full EPSS history (12 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-41281

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 3.6 [email protected]
4.3 2.0 MEDIUM
AV:N/AC:M/Au:N/C:N/I:P/A:N Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:N)
No confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:N)
No availability impact.
8.6 2.9 [email protected]

Weakness enumeration for CVE-2021-41281

GitHub Security Advisory for CVE-2021-41281

OS Trackers for CVE-2021-41281

vendor priority summary link
alpine high CVE-2021-41281: 1 source package rows (synapse); 19 state rows across 7 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 7, open 12. https://security.alpinelinux.org/vuln/CVE-2021-41281
debian not yet assigned CVE-2021-41281 not yet assigned priority: Debian including 1 source packages (matrix-synapse), 2 status rows across 2 suites (forky, sid): resolved 2. https://security-tracker.debian.org/tracker/CVE-2021-41281
ubuntu medium CVE-2021-41281 medium priority: Ubuntu including 1 source packages (matrix-synapse), 13 status rows across 13 suites (bionic, focal, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, trusty, upstream, xenial): ignored 5, not-affected 4, needed 3, released 1. https://ubuntu.com/security/CVE-2021-41281

Affected software / configurations for CVE-2021-41281

Vendor Product Version Raw CPE
matrix synapse < 1.47.1 cpe:2.3:a:matrix:synapse:*:*:*:*:*:*:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*

References for CVE-2021-41281

cvelogic Threat Intelligence