Skip to main content
Vulnerability Database/CVE-2026-103764

CVE-2026-103764: Mooncake Use-After-Free Vulnerability

CVE-2026-103764 is a use-after-free vulnerability in Mooncake transfer engine that enables unauthenticated attackers to access arbitrary process memory through untrusted pointer dereference, leading to data disclosure or code execution.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-103764 Overview

CVE-2026-103764 is an untrusted pointer dereference vulnerability [CWE-822] in the Mooncake transfer engine before version 0.3.13. The flaw resides in ServerSession::readHeader within the TCP transport layer. Unauthenticated attackers can read and write arbitrary process memory by sending a crafted SessionHeader over the TCP transport data port. The header accepts attacker-controlled addr and size values combined with READ or WRITE opcodes. Successful exploitation discloses key-value (KV) cache contents, prompts, and secrets, or corrupts memory to achieve code execution. Mooncake is a KV cache store used in large language model (LLM) inference infrastructure, making this flaw especially relevant to AI serving stacks.

Critical Impact

Unauthenticated network attackers can read or write arbitrary process memory in Mooncake deployments, exposing LLM prompts, cached secrets, and enabling code execution.

Affected Products

  • Mooncake transfer engine versions prior to 0.3.13
  • mooncake-transfer-engine TCP transport component
  • LLM inference stacks embedding Mooncake KV cache transport

Discovery Timeline

  • 2026-10-02 - CVE-2026-103764 published to the National Vulnerability Database (NVD)
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-103764

Vulnerability Analysis

The Mooncake transfer engine exposes a TCP transport data port that services inbound session requests. The ServerSession::readHeader function parses a SessionHeader structure containing an operation code, a target memory address (addr), and a transfer size. The server dereferences the attacker-supplied pointer directly without validating that the address belongs to a registered buffer or that the size falls within allocated bounds.

When the opcode is READ, the server copies size bytes starting at addr back to the attacker. When the opcode is WRITE, it overwrites memory at addr with attacker-provided bytes. Because the TCP transport does not require authentication, any peer reachable on the data port can issue these primitives. This weakness is tracked under CWE-822: Untrusted Pointer Dereference.

Root Cause

The root cause is missing validation of pointer and length fields received from untrusted network peers. The transport protocol treats remote peers as mutually trusted memory partners, which is appropriate for RDMA-style registered regions but unsafe when exposed to arbitrary network callers. See the vulnerable TCP transport source for context.

Attack Vector

An unauthenticated remote attacker connects to the TCP transport data port and sends a crafted SessionHeader. With a READ opcode, the attacker extracts KV cache entries, inference prompts, API tokens, or process secrets. With a WRITE opcode, the attacker overwrites function pointers, return addresses, or heap metadata to pivot toward remote code execution.

text
// Upstream patch metadata (CMakeLists.txt changes from commit a2933849)
 file(GLOB TCP_SOURCES "*.cpp")
+file(GLOB TCP_IMPL_HEADERS "*_impl.h")

 if (USE_HIP)
+  list(APPEND TCP_SOURCES ${TCP_IMPL_HEADERS})
   hipify_files(TCP_SOURCES)
 endif()

 add_library(tcp_transport OBJECT ${TCP_SOURCES})
 target_link_libraries(tcp_transport PRIVATE JsonCpp::JsonCpp yalantinglibs::yalantinglibs)
+
+if(BUILD_UNIT_TESTS)
+  target_compile_definitions(tcp_transport
+                             PRIVATE MOONCAKE_TCP_TRANSPORT_TEST_HOOKS)
+endif()

Source: GitHub Commit a2933849. The upstream fix schedules TCP transfers on bounded per-peer connection lanes and introduces test hooks that validate header handling.

Detection Methods for CVE-2026-103764

Indicators of Compromise

  • Inbound TCP connections to the Mooncake transfer engine data port from hosts outside the trusted inference cluster.
  • Unexpected spikes in outbound bytes from Mooncake processes consistent with bulk memory exfiltration.
  • Mooncake process crashes, segmentation faults, or restarts correlated with external TCP traffic.
  • Session headers containing non-registered or out-of-range addr values logged by instrumented builds.

Detection Strategies

  • Baseline the Mooncake TCP transport port and alert on connections from any source outside the inference fabric.
  • Inspect network flows for abnormally large READ/WRITE session payloads that do not match normal cache transfer patterns.
  • Monitor for repeated connection attempts from a single peer issuing varied addr values, indicating memory scanning.

Monitoring Recommendations

How to Mitigate CVE-2026-103764

Immediate Actions Required

  • Upgrade all Mooncake transfer engine installations to version 0.3.13 or later per the GitHub Release v0.3.13 Notes.
  • Restrict the TCP transport data port to a private management network reachable only by trusted inference nodes.
  • Audit historical network logs for inbound connections to the data port from unexpected sources.
  • Rotate API tokens, model secrets, and credentials that resided in memory on exposed hosts.

Patch Information

The fix is delivered in Mooncake 0.3.13 via upstream commit a2933849. The patch schedules TCP transfers on bounded per-peer connection lanes and adds validation hooks to the transport layer. Operators should rebuild dependent LLM serving images against the patched release.

Workarounds

  • Place the Mooncake transfer engine behind a firewall or network policy that permits only peer inference nodes.
  • Use mutual TLS or an IPSec tunnel between inference nodes to prevent untrusted peers from reaching the data port.
  • Disable the TCP transport and rely on alternative transports where feasible until patching is complete.
bash
# Example: restrict Mooncake TCP transport to the inference subnet with nftables
nft add table inet mooncake
nft add chain inet mooncake input { type filter hook input priority 0 \; policy drop \; }
nft add rule inet mooncake input ip saddr 10.42.0.0/16 tcp dport 14000 accept
nft add rule inet mooncake input tcp dport 14000 drop

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.