☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 5.3 🐛 CWE-789
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-52791

CVE-2024-52791 Supply Chain Attack in Matrix media repo
📅 PUBLISHED: 2025-01-16 19:12 UTC 🔄 UPDATED: 2026-09-23 20:31 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.76%
👁️
0.76% probability
18.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-52791 is a denial-of-service (DoS) vulnerability in the Matrix Media Repo (MMR), a highly configurable multi-homeserver media repository for the Matrix communication protocol. The vulnerability arises from MMR's failure to limit the size of JSON responses fetched from remote servers during normal operation. An attacker controlling a resource server can return an excessively large JSON payload, causing MMR to consume all available memory and crash. This can lead to service disruption for all users relying on that MMR instance. The vulnerability is fixed in MMR v1.3.8. For users unable to upgrade, mitigations include configuring forward proxies to block unsafe hosts, setting memory limits with auto-restart, and running multiple MMR processes for redundancy.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is in the Matrix Media Repo, which is a Go-based application. It is not an NPM, PyPI, Go, or Ruby package, but it is a critical component in the Matrix ecosystem. The supply chain risk is moderate, as the vulnerability is in the application itself, not in a dependency. However, any organization running MMR should verify they are using the patched version (1.3.8) and ensure their deployment is not exposed to untrusted remote servers.

CVSS Breakdown & Threat Level

  • CVSS Score: 5.3 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: None
  • Integrity Impact: None
  • Availability Impact: Low

The threat level is medium due to the low complexity and no required privileges, but the impact is limited to availability (DoS). The EPSS score is 0.0%, indicating low exploitation likelihood at this time.

Deep Dive & Mechanics

The vulnerability is a classic resource exhaustion issue (CWE-770). MMR, as part of its normal operation, fetches media and metadata from remote Matrix homeservers. These remote servers can return JSON responses. The flaw is that MMR does not enforce a maximum size limit on the JSON it parses. An attacker who controls a remote server (or can spoof responses) can send a JSON payload that is extremely large (e.g., gigabytes of nested data). When MMR attempts to parse this JSON, it allocates memory to hold the entire structure, leading to memory exhaustion and a crash of the MMR process.

The attack does not require authentication, as MMR often fetches data from public endpoints. The attacker only needs to be able to respond to MMR's requests with a malicious payload. This could be achieved by:

  • Operating a malicious Matrix homeserver that MMR contacts.
  • Performing a man-in-the-middle attack if MMR uses unencrypted HTTP.
  • Exploiting a DNS rebinding or SSRF vulnerability to make MMR fetch from a controlled server.

The fix in v1.3.8 likely introduces a maximum JSON size limit or uses streaming parsing to avoid loading the entire payload into memory.

Vulnerable vs. Patched Code

The vulnerable code is in the JSON parsing logic of MMR. While the exact code is not publicly disclosed, the patch likely involves adding a size check before parsing. A conceptual example:

Vulnerable (pseudo-code):

func fetchAndParse(url string) {
    resp, _ := http.Get(url)
    body, _ := ioutil.ReadAll(resp.Body) // No size limit
    var data interface{}
    json.Unmarshal(body, &data) // Allocates memory for entire JSON
    // ... process data
}

Patched (pseudo-code):

func fetchAndParse(url string) {
    resp, _ := http.Get(url)
    limitedReader := io.LimitReader(resp.Body, MAX_JSON_SIZE) // e.g., 10MB
    body, _ := ioutil.ReadAll(limitedReader)
    var data interface{}
    json.Unmarshal(body, &data)
    // ... process data
}

The patch ensures that the response body is truncated to a safe maximum size before parsing, preventing memory exhaustion.

Exploitation & Lab Setup

Red Team

Objective: Cause a denial of service on a target MMR instance.

Prerequisites:

  • A server that can respond to HTTP requests from the target MMR.
  • Knowledge of the target MMR's IP/domain.

Steps:

  1. Set up a simple HTTP server that returns a large JSON payload. For example, using Python:
    from http.server import HTTPServer, BaseHTTPRequestHandler
    import json
    
    class Handler(BaseHTTPRequestHandler):
        def do_GET(self):
            # Generate a large JSON payload (e.g., 1GB)
            large_data = {"data": "x" * (1024**3)}  # 1GB string
            self.send_response(200)
            self.send_header('Content-Type', 'application/json')
            self.end_headers()
            self.wfile.write(json.dumps(large_data).encode())
    
    HTTPServer(('0.0.0.0', 9999), Handler).serve_forever()
    
  2. Make the target MMR fetch from your server. This could be done by:
    • If you control a homeserver that MMR contacts, simply respond with the malicious payload.
    • If you can perform a DNS rebinding attack, make MMR resolve a domain to your IP.
    • If MMR has an SSRF vulnerability, exploit it to make a request to your server.
  3. Monitor the target MMR's memory usage. It should spike and eventually crash.

Expected Outcome: The MMR process crashes due to out-of-memory (OOM) kill, causing a denial of service for all users.

Blue Team

Objective: Detect and prevent exploitation of CVE-2024-52791.

Detection:

  • Monitor MMR process memory usage. A sudden spike above normal thresholds (e.g., > 500MB) is suspicious.
  • Monitor network traffic for unusually large HTTP responses (e.g., > 10MB) from remote servers to MMR.
  • Use the detection rules provided below.

Prevention:

  • Upgrade to MMR v1.3.8 immediately.
  • If upgrade is not possible:
    • Configure a forward proxy (e.g., Squid, HAProxy) to block requests to known malicious or untrusted hosts.
    • Set memory limits on the MMR process (e.g., using ulimit or container limits) and configure auto-restart (e.g., systemd Restart=always).
    • Run multiple MMR instances behind a load balancer to ensure redundancy if one crashes.

Indicators of Compromise (IOCs)

  • Network: HTTP responses to MMR with Content-Type: application/json and body size > 10MB.
  • Process: MMR process terminated by OOM killer. Log entries like Out of memory: Kill process ... (mmr).
  • Logs: MMR logs showing json.Unmarshal errors or http: response body too large (if patched version logs such events).
  • Memory: High memory usage by MMR process (e.g., > 1GB) in a short time.

Detection Engineering

YARA Rule

rule CVE_2024_52791_MMR_DoS {
    meta:
        description = "Detects MMR logs indicating memory exhaustion from large JSON"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-52791"
    strings:
        $oom = "Out of memory" nocase
        $mmr = "mmr" nocase
        $json = "json.Unmarshal" nocase
    condition:
        $oom and $mmr and $json
}

Sigma Rule

title: MMR Memory Exhaustion from Large JSON
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects MMR process crashes due to OOM from large JSON responses
author: Valters IT
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/mmr'
        CommandLine|contains: 'mmr'
    condition: selection
    timeframe: 5m
falsepositives:
    - Legitimate large media files (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-52791 MMR Large JSON Response"; flow:to_client; content:"Content-Type|3a| application/json"; http_header; content:!"Content-Length|3a| 0"; http_header; byte_test:1,>,10000000,0,relative,string,dec; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate:

  • Upgrade to MMR v1.3.8 or later.

If upgrade is not possible:

  • Configure a forward proxy to block requests to untrusted hosts.
  • Set memory limits on the MMR process (e.g., ulimit -v 1048576 for 1GB) and configure auto-restart.
  • Run multiple MMR instances behind a load balancer.

Long-term:

  • Implement network segmentation to limit MMR's outbound connections.
  • Monitor MMR logs and memory usage for anomalies.
  • Apply security patches promptly.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-52791/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.