CVE-2024-37303: Matrix Synapse unauthenticated media write in media repository

CVE-2024-37303 · Severity: medium · CVSS 5.3 · Published 2024-12-03

Synapse, a popular server for the Matrix communication protocol, contains a flaw in how it handles media files. Unauthorized remote users can force a server to download and store arbitrary files from other servers, which then become publicly available on the local server. This could allow malicious actors to host illegal or problematic content on a company's infrastructure without permission, potentially leading to reputational damage or legal issues.

Technologies: matrix-synapse (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2024-37303 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-37303 being exploited in the wild.
How severe is CVE-2024-37303?
Medium severity, with a CVSS score of 5.3, published 3 December 2024.
Which products and versions are affected?
matrix-synapse (PyPI) < 1.106, ECOSYSTEM:introduced=0,fixed=1.106, ECOSYSTEM:introduced=0,fixed=1.106.0.
Is there a fix for CVE-2024-37303?
Yes. matrix-synapse (PyPI): upgrade to 1.106, 1.106.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2024-37303 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2024-37303?
Check whether you run matrix-synapse (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • matrix-synapse (PyPI): upgrade to 1.106, 1.106.0 or later
    pip install "matrix-synapse>=1.106.0"

Technical details

A missing authentication vulnerability (CWE-306) exists in Synapse's media repository before version 1.106. By design, unauthenticated remote participants can trigger a download and caching mechanism that fetches media from a remote homeserver to the local repository. Once cached, this content is accessible via unauthenticated local endpoints. Attackers can exploit this to plant arbitrary or malicious content on a target homeserver. Synapse 1.106 introduces authenticated media endpoints as a partial mitigation, with plans to deprecate unauthenticated access in future releases.

Affected products

  • Matrix.org Synapse < 1.106

Identifiers

  • CVE-2024-37303
  • GHSA-gjgr-7834-rhxr
  • PYSEC-2024-287

Timeline

  • 2024-12-03: disclosed
  • 2024-12-03: advisory
  • 2024-12-03: patched: Fixed in version 1.106

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.