CVE-2024-52791
Published: 16 January 2025
Summary
CVE-2024-52791 is a medium-severity Memory Allocation with Excessive Size Value (CWE-789) vulnerability in T2Bot Matrix-Media-Repo. Its CVSS base score is 5.3 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Application or System Exploitation (T1499.004); ranked at the 27.7th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified are NIST 800-53 SC-5 (Denial-of-service Protection) and SC-6 (Resource Availability).
Threat & Defense at a Glance
Threat & Defense Details
Mitigating Controls (NIST 800-53 r5)AI
SI-10 requires validation of information inputs like JSON payloads to reject oversized responses before parsing, directly preventing memory exhaustion in MMR.
SC-5 provides denial-of-service protections such as resource limits and monitoring that mitigate memory exhaustion attacks via large JSON responses.
SC-6 enforces resource availability controls like memory limits on MMR processes to prevent exhaustion from parsing large JSON payloads.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
Directly enables application exhaustion DoS via remote unauthenticated exploitation of memory parsing flaw.
NVD Description
Matrix Media Repo (MMR) is a highly configurable multi-homeserver media repository for Matrix. MMR makes requests to other servers as part of normal operation, and these resource owners can return large amounts of JSON back to MMR for parsing. In…
more
parsing, MMR can consume large amounts of memory and exhaust available memory. This is fixed in MMR v1.3.8. Users are advised to upgrade. For users unable to upgrade; forward proxies can be configured to block requests to unsafe hosts. Alternatively, MMR processes can be configured with memory limits and auto-restart. Running multiple MMR processes concurrently can help ensure a restart does not overly impact users.
Deeper analysisAI
CVE-2024-52791 is a memory exhaustion vulnerability (CWE-789) in Matrix Media Repo (MMR), a highly configurable multi-homeserver media repository for the Matrix protocol. During normal operation, MMR fetches resources from other servers, which can respond with excessively large JSON payloads. Parsing these payloads causes MMR to consume significant amounts of memory, potentially leading to exhaustion of available resources. The vulnerability is rated with a CVSS v3.1 base score of 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
Any attacker controlling a server that MMR requests resources from can exploit this issue remotely without authentication or user interaction. By serving oversized JSON responses, the attacker triggers high memory usage in MMR during parsing, resulting in denial-of-service through resource exhaustion and potential service crashes.
The vulnerability is fixed in MMR version 1.3.8, and users are advised to upgrade immediately. For those unable to upgrade, mitigations include configuring forward proxies to block requests to unsafe hosts, setting memory limits on MMR processes with auto-restart capabilities, or running multiple MMR processes concurrently to minimize downtime during restarts. Details are available in the GitHub security advisory (GHSA-gp86-q8hg-fpxj) and release notes for v1.3.8.
Details
- CWE(s)