# CVE-2021-41281: Path traversal in Matrix Synapse

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.58%, higher than 76% of CVEs (2026-12-01)
- Published: 2021-11-23T19:15:18.000Z
- Modified: 2026-07-08T06:28:00.355Z
- Also known as: GHSA-3hfw-x7gx-437c, PYSEC-2021-436
- Weaknesses: CWE-22
- 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.

(As written by CVE List.)

## Affected

- matrix-org synapse: < 1.47.1
- matrix-synapse (PyPI): before 1.47.1; before 91f2bd0907f1d05af67166846988e49644eb650c
- matrix synapse: before 1.47.1
- fedoraproject fedora: 34; 35

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/matrix-org/synapse/security/advisories/GHSA-3hfw-x7gx-437c> (advisory, mitigation, third-party-advisory, web)
- <https://github.com/matrix-org/synapse/commit/91f2bd090> (fix, patch, third-party-advisory, web)
- <https://github.com/matrix-org/synapse/releases/tag/v1.47.1> (release-notes, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/N3WY56LCEZ4ZECLWV5KMAXF2PSMUB4F2/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EU7QRE55U4IUEDLKT5IYPWL3UXMELFAS/> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-41281> (advisory)
- <https://github.com/matrix-org/synapse> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-436.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EU7QRE55U4IUEDLKT5IYPWL3UXMELFAS> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/N3WY56LCEZ4ZECLWV5KMAXF2PSMUB4F2> (web)

## Sources

- CVE List: [CVE-2021-41281](https://www.cve.org/CVERecord?id=CVE-2021-41281), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-3hfw-x7gx-437c](https://github.com/advisories/GHSA-3hfw-x7gx-437c), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-41281](https://nvd.nist.gov/vuln/detail/CVE-2021-41281), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-436](https://osv.dev/vulnerability/PYSEC-2021-436), CC-BY-4.0, modified 2026-02-26

---

Page: https://cve.day/CVE-2021-41281 · Whole record: https://cve.day/CVE-2021-41281.json · Rebuilt by cve.day 2026-11-25T22:58:05.736Z
