CVE-2024-36403: Github.com/t2bot/matrix media repo Denial of Service Vulnerability
MODERATECVE-2024-36403 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Github.com/t2bot/matrix media repo libraries in the Go ecosystem. The issue involves matrix-media-repo (mmr) allows denial of service/high operating costs through unauthenticated downloads. Remediation is available by upgrading affected packages to version 1.3.5.
CVE-2024-36403 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2024-36403
To remediate this vulnerability, upgrade all affected Github.com/t2bot/matrix media repo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/t2bot/matrix-media-repo to 1.3.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/t2bot/matrix-media-repo
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-36403, inspect your project dependencies for Github.com/t2bot/matrix media repo:
inspect dependencies for github.com/t2bot/matrix-media-repo
Analyze the terminal output to locate any version of Github.com/t2bot/matrix media repo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Github.com/t2bot/matrix media repo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-36403 Affected Github.com/t2bot/matrix media repo Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/t2bot/matrix-media-repo
|
Go |
< 1.3.5
|
1.3.5
|
References
Frequently Asked Questions
What is CVE-2024-36403?
Which Github.com/t2bot/matrix media repo versions are affected?
What version fixes CVE-2024-36403?
Is github.com/t2bot/matrix-media-repo affected?
What is the CVSS score of CVE-2024-36403?
What CWE is associated with CVE-2024-36403?
How can I check Go dependencies for CVE-2024-36403?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vc2m-hw89-qjxf",
"modified" : "2025-01-17T15:39:25Z",
"published" : "2025-01-16T19:05:12Z",
"aliases" : [ "CVE-2024-36403" ],
"summary" : "matrix-media-repo (MMR) allows denial of service/high operating costs through unauthenticated downloads",
"details" : "### Impact\n\nMMR before version 1.3.5 is vulnerable to unbounded disk consumption, where an unauthenticated adversary can induce it to download and cache large amounts of remote media files.\n\nMMR's typical operating environment uses S3-like storage as a backend, with file-backed store as an alternative option. Instances using a file-backed store or those which self-host an S3 storage system are therefore vulnerable to a disk fill attack. Once the disk is full, authenticated users will be unable to upload new media, resulting in denial of service.\n\nFor instances configured to use a cloud-based S3 storage option, this could result in high service fees instead of a denial of service.\n\n### Patches\n\nMMR 1.3.5 introduces a new default-on \"leaky bucket\" rate limit to reduce the amount of data a user can request at a time. This does not fully address the issue, but does limit an unauthenticated user's ability to request large amounts of data.\n\nOperators should note that the leaky bucket implementation introduced in MMR 1.3.5 requires the IP address associated with the request to be forwarded, to avoid mistakenly applying the rate limit to the reverse proxy instead. To avoid this issue, the reverse proxy should populate the `X-Forwarded-For` header when sending the request to MMR.\n\n### Workarounds\n\nOperators may wish to lower the maximum file size they allow and implement harsh rate limits, though this can still lead to a large amount of data to be downloaded. \n\n### References\n\nhttps://en.wikipedia.org/wiki/Leaky_bucket#As_a_meter",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/t2bot/matrix-media-repo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/t2bot/matrix-media-repo/security/advisories/GHSA-vc2m-hw89-qjxf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-36403"
}, {
"type" : "WEB",
"url" : "https://en.wikipedia.org/wiki/Leaky_bucket#As_a_meter"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/t2bot/matrix-media-repo"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2025-3401"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-01-16T19:05:12Z",
"nvd_published_at" : "2025-01-16T20:15:32Z"
}
}