Vulnerability

CVE-2026-137567 in llama.cpp: Unauthenticated ggml-rpc-server Heap Write, Affected Builds & Patch Guide

Disclosed on November 26, 2026, CVE-2026-137567 (CVSS 3.1: 9.8, CVSS 4.0: 9.3) exposes unauthenticated llama.cpp ggml-rpc-server workers (builds b11450 through b12657) to an out-of-bounds heap write that can crash servers or enable code execution. Here is the root cause, affected build matrix, safe detection commands, and remediation steps for build b12658.

By 0xScorPionSon

8 min read

CVE-2026-137567 in llama.cpp: Unauthenticated ggml-rpc-server Heap Write, Affected Builds & Patch Guide

CVE-2026-137567 llama.cpp RPC Server 3D isometric heap write and b12658 shield

Executive Summary

On November 26, 2026, NIST NVD and CNA VulnCheck published CVE-2026-137567, a critical out-of-bounds write vulnerability (CWE-787) in the ggml RPC server (ggml-rpc-server) bundled with ggml-org/llama.cpp. Rated CVSS 3.1: 9.8 (Critical) and CVSS 4.0: 9.3 (Critical), the flaw allows any unauthenticated network client that can reach the RPC worker port to write to arbitrary heap addresses via zero-element destination tensors, causing a server crash or potential code execution.

  • Affected Versions: llama.cpp builds b11450 through b12657 (inclusive) when running ggml-rpc-server.
  • Fixed Version: llama.cpp build b12658 (released November 24, 2026 via PR #32651 and commit 03813c56e47f6cd7a9b9bc2ad8edcebed88ce342).
  • Exploitation Status & CISA KEV: As of November 26, 2026, Brandefense and Rapid7 confirm no exploitation in the wild has been verified, and the flaw is not listed in the CISA KEV catalog (catalog version 2026.11.25). Brandefense Blackhole recorded two dark-chat posts referencing the CVE between August 28 and November 26, 2026—a triage signal, not confirmed active exploitation.

Confidence level: High for CVSS vectors, affected build range, root-cause mechanism, and patch commit verified across NIST NVD, Rapid7, Brandefense, and ThreatFrontier; Note that NVD itself currently lists the record as Awaiting Enrichment, with scores contributed by CNA VulnCheck.


Affected Versions & Exposure Scope

Build Matrix & Risk Exposure

llama.cpp uses its RPC worker (ggml-rpc-server / rpc-server) to distribute large model layers across multiple hosts. The head node (llama-server --rpc ...) acts as the client, while each worker opens a listening TCP socket. Because the ggml-rpc wire protocol has no built-in authentication, any host that can establish a TCP connection to a vulnerable worker port can trigger CVE-2026-137567.

Component / Artifact Affected Range Fixed Build CVSS v3.1 / v4.0 Exposure Condition
ggml-org/llama.cpp (ggml-rpc-server) b11450 through b12657 b12658 (Nov 24, 2026) 9.8 / 9.3 (Critical) RPC worker port reachable by untrusted network clients
Downstream Inference Wrappers / Containers Any image bundling llama.cpp < b12658 Rebuild with b12658+ Inherits 9.8 / 9.3 Transitive exposure if wrapper starts ggml-rpc-server
Standalone Local llama-server (No --rpc) Not exposed via this network path Update to b12658+ recommended N/A for RPC vector Requires listening RPC worker process

CVSS v3.1 & v4.0 Vector Breakdown

Both Rapid7 and NIST NVD publish full VulnCheck-contributed CVSS vectors confirming that exploitation requires network reachability to the worker port, zero privileges, and zero user interaction:

Scoring Standard Base Score & Severity Vector String Key Implication
CVSS v3.1 9.8 (Critical) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Unauthenticated network RCE/crash with high confidentiality, integrity, and availability impact
CVSS v4.0 9.3 (Critical) CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N No attack requirements (AT:N), no subsequent-system scope escape (SC:N/SI:N/SA:N)

Because ggml-rpc-server trusts peer-supplied frames without authentication, ThreatFrontier recommends auditing your llama.cpp inventory against three sibling late-2026 issues at the same time:

  • CVE-2026-118375 & CVE-2026-119052 (Oct 24 & Oct 27, 2026): An RDMA transport stack overflow and a single-message crash in rpc-server, both fixed prior to b12658.
  • CVE-2026-116816: A separate file-loading flaw where a crafted GGUF model file corrupts the heap on load—underscoring why inference hosts should only load cryptographically verified model weights.

Disclosure & Patch Timeline

According to Brandefense and ThreatFrontier, CVE-2026-137567 (credited to Min P. Hong of SEWORKS) is the third rpc-server vulnerability addressed since late October 2026, following CVE-2026-118375 (RDMA stack overflow) and CVE-2026-119052 (single-message crash):

Date Milestone Source
Nov 20, 2026 Public disclosure date recorded in VulnCheck CNA advisory Brandefense / VulnCheck
Nov 24, 2026 Upstream llama.cpp merges PR #32651 and releases build b12658 GitHub / NVD
Nov 26, 2026 NIST NVD, Rapid7, and VulnCheck publish CVE-2026-137567 NIST NVD / Rapid7

Root Cause & Attack Vector Analysis

How the Zero-Element Tensor Bounds Bypass Works

According to NIST NVD (ggml/src/ggml-rpc/ggml-rpc.cpp lines 2083–2122) and ThreatFrontier's technical breakdown, the vulnerability stems from asymmetric bounds validation in copy_tensor and deserialize_tensor:

  1. Address Disclosure (BUFFER_GET_BASE): An unauthenticated client queries BUFFER_GET_BASE to retrieve the base virtual address of allocated server buffers, defeating address space layout randomization (ASLR) for the target heap region.
  2. Zero-Element Tensor Pointer Bypass (RPC_CMD_COPY_TENSOR): deserialize_tensor only bound a tensor's data pointer to its backing buffer when the tensor had non-zero elements. Meanwhile, copy_tensor checked only that the copy operation ended before the end of the destination buffer—failing to verify that the destination pointer started at or above the buffer base.
  3. Arbitrary Heap Write: By submitting a zero-element destination tensor whose data pointer sits below the leaked buffer base, a client passes the end-of-buffer check and writes controlled bytes to arbitrary heap addresses—crashing the worker or corrupting function/control structures.
flowchart LR
    A[Untrusted Network Peer] -->|1. BUFFER_GET_BASE| B[ggml-rpc-server<br/>Leaks Buffer Base Address]
    A -->|2. RPC_CMD_COPY_TENSOR<br/>0-Element Dst Ptr Below Base| C{Pre-b12658 Check<br/>End <= Buffer End Only}
    C -->|Passes End Check| D[Out-of-Bounds Heap Write<br/>CWE-787 Crash / Potential RCE]
    C -->|Fixed in b12658 PR #32651| E[rpc_check_region & Overflow Checks<br/>Rejects & Closes Connection]

What Upstream PR #32651 Changed in Build b12658

Rather than a fragile one-line check, PR #32651 ("rpc: typed request helpers and a single validation step on the server") refactors RPC request parsing:

  • deserialize_tensor now performs tensor-size integer overflow checks before validating buffer membership.
  • A centralized rpc_check_region helper validates both start and end bounds of every client-supplied region against the target tensor and buffer.
  • Request headers pass through a bounds-checked reader, and failed client-requested allocations cleanly close the client socket rather than terminating the server process.
  • The ggml-rpc wire format remains unchanged, though operators should upgrade both head nodes and workers together.
  • As ThreatFrontier notes from downstream commit logs, PR #32651 also closes a neighboring integer-wraparound condition in SET_TENSOR, SET_TENSOR_MULTI, SET_TENSOR_HASH, and GET_TENSOR where data pointer + offset could wrap around and trigger a GGML_ASSERT process termination.

Detection, Hunting & Mitigation

1. Inventory Running llama.cpp Builds & Listening RPC Ports

Because container tags and wrapper packages do not always expose the underlying llama.cpp commit, inspect live processes, listening sockets, and binary build strings directly on inference hosts:

ps aux | grep -E "rpc-server|llama-server"

ss -tulpn | grep -E "50052|rpc"

llama-server --version

If llama-server --version or your container build manifest reports any build number between b11450 and b12657, or if ss shows ggml-rpc-server bound to 0.0.0.0 or a routable interface, treat the host as exposed.

2. Upgrade to b12658 or Later Immediately

Pull the patched upstream release (b12658 or newer) and rebuild any custom CUDA/ROCm/Vulkan container images:

git fetch --tags origin
git checkout b12658
cmake -B build && cmake --build build --config Release -j

After restarting workers, verify the live binary reports b12658 or higher and confirm no stale pre-patch worker processes remain running.

3. Enforce Strict Network Isolation (Compensating Control)

As ThreatFrontier notes, ggml-rpc has no authentication layer and upstream's RPC README explicitly warns against running it on open networks. Even after patching to b12658:

  • Bind to Loopback or Dedicated Cluster Interfaces: Never bind ggml-rpc-server to 0.0.0.0 on multi-tenant or internet-facing hosts.
  • Firewall RPC Ports (50052/tcp or custom --port): Allow inbound connections strictly from the head node's private cluster IP or over an encrypted WireGuard/mTLS tunnel:
ufw allow from 10.0.10.5 to any port 50052 proto tcp
ufw deny 50052/tcp
  • Least-Privilege Service Account: Run ggml-rpc-server under an unprivileged system user with read-only access to model weights and no access to sensitive host credentials or Docker sockets.
  • Kubernetes & Container NetworkPolicies: If running distributed llama.cpp RPC workers inside Kubernetes or Docker Swarm, attach an explicit ingress NetworkPolicy restricting the worker pod port strictly to pods carrying the app=llama-head label, and drop CAP_NET_RAW / NET_ADMIN capabilities.
  • Verify Wrapper & Sidecar Binaries: Many local AI orchestration tools and desktop inference launchers bundle llama.cpp binaries under custom names or inside Python/Go wheels. Inspect the embedded binary version directly rather than relying solely on the wrapper's top-level release tag.

4. Hunt for Prior Exposure Symptoms

On any worker that was reachable from untrusted subnets prior to patching, inspect systemd journal logs, container exit codes, and dmesg for SIGSEGV / SIGABRT crashes or unexpected OOM/GGML_ASSERT restarts, and audit outbound network connections from the worker host. As Brandefense advises, never rely on a package manager label alone to confirm remediation—always verify the live process binary path and build ID after restarting services, and rotate any API keys or tokens stored on hosts where an unpatched ggml-rpc-server was exposed.


Frequently Asked Questions

Can an attacker exploit CVE-2026-137567 without authentication?

Yes. According to NIST NVD and VulnCheck (CVSS:4.0/AV:N/AC:L/PR:N/UI:N), the ggml-rpc-server protocol has no authentication mechanism, so any unauthenticated client that can reach the worker's TCP port on affected builds (b11450–b12657) can send BUFFER_GET_BASE and RPC_CMD_COPY_TENSOR.

Is CVE-2026-137567 being actively exploited in the wild?

As of November 26, 2026, Brandefense and Rapid7 report no confirmed exploitation in the wild, and the vulnerability is not in CISA's KEV catalog (2026.11.25). However, because ggml-rpc-server requires no credentials when network-reachable, exposed instances should be firewalled and patched immediately.

Am I vulnerable if I only run llama-server locally without ggml-rpc-server?

CVE-2026-137567 specifically affects the ggml RPC server path (ggml-rpc.cpp) used to distribute inference across worker nodes. If you do not run ggml-rpc-server (or a downstream wrapper that launches an RPC worker), this network vector is not exposed, though updating to b12658+ is still recommended.

Which llama.cpp build fixes CVE-2026-137567, and does it break wire compatibility?

Build b12658 (released November 24, 2026 via PR #32651) fixes CVE-2026-137567 by adding centralized tensor-size overflow checks and rpc_check_region bounds validation. Upstream release notes state the wire format is unchanged, though upgrading both head nodes and workers together is best practice.

What if I cannot upgrade llama.cpp to b12658 immediately?

VulnCheck lists no official software workaround other than upgrading, so immediate risk reduction relies on network isolation: bind the RPC worker to a private cluster interface or loopback and enforce host firewall rules allowing only the trusted head node's IP.


Sources

More on Vulnerability

Vulnerability

CVE-2026-103406 in Juniper Session Smart Conductor: Active Exploitation, Affected Versions & Patch Guide

CISA added CVE-2026-103406 (CVSS 9.8), an unauthenticated OS command injection vulnerability in HPE Juniper Session Smart Conductor's AutomatedProvisioner, to its Known Exploited Vulnerabilities (KEV) catalog on November 25, 2026, setting a November 28 remediation deadline. Learn which 7.0.x, 7.1.x, and 7.2.x branches are vulnerable, how the Salt minion ID vector works, and how to patch and perform forensic triage.

9 min read

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla