CVE-2024-36402 Unauthenticated writes to the media repository allow planting of problematic content in Matrix Media Repo

Medium 5.3 Published Updated

Unauthenticated attackers can plant malicious content in the Matrix Media Repository by exploiting unauthenticated media download endpoints.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-36402?

CVE-2024-36402 is a medium-severity missing authorization vulnerability in t2bot matrix-media-repo, published on 16 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Matrix Media Repo (MMR) is a highly configurable multi-homeserver media repository for Matrix. MMR before version 1.3.5 allows, by design, unauthenticated remote participants to trigger a download and caching of remote media from a remote homeserver to the local media repository. Such content then also becomes available for download from the local homeserver in an unauthenticated way. The implication is that unauthenticated remote adversaries can use this functionality to plant problematic content into the media repository. MMR 1.3.5 introduces a partial mitigation in the form of new endpoints which require authentication for media downloads. The unauthenticated endpoints will be frozen in a future release, closing the attack vector. Though extremely limited, server operators can use more strict rate limits based on IP address as a partial workaround.

Weakness: CWE-287

Which versions are affected by CVE-2024-36402?

3 open source packages ship an affected version, including github.com/t2bot/matrix-media-repo. It affects 1 product.

PackageAffectedFixed in
github.com/t2bot/matrix-media-repo GoAll versions1.3.5
github.com/t2bot/matrix-media-repo GoAll versions1.3.5
github.com/t2bot/matrix-media-repo GoAll versions1.3.5

Products include T2bot Matrix-Media-Repo.

How do I fix CVE-2024-36402?

Upgrade github.com/t2bot/matrix-media-repo to 1.3.5 or later.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2024-36402 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-36402 exists.

Sources

Also known as GHSA-8vmr-h7h5-cqhg, GO-2025-3397.

Is CVE-2024-36402 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free