An out-of-bounds write in the RPC server of llama.cpp lets a network client copy bytes of its choice to a memory address of its choice inside the server process. Tracked as CVE-2026-137567, the flaw scores 9.3 on CVSS 4.0 (9.8 on CVSS 3.1). The VulnCheck advisory published on November 26, 2026 gives the outcome as a server crash or code execution.
No account is needed, because the RPC protocol has no authentication: whoever can open a TCP connection to the server port can send every command. That port does have to be reachable. ggml-rpc-server binds to 127.0.0.1:50052 by default and prints a warning when started on any other address, so the machines at risk are the ones deliberately set up to share inference work across a network. Neither VulnCheck nor the CVE record reports exploitation, and no proof of concept (PoC) has been published.
- Affected: llama.cpp builds b11450 through b12657, on hosts that run the RPC server.
- Fixed in: b12658 (November 24, 2026) and every later build, including v1.1.0.
- Attack requires: network access to the RPC port. No credentials, no user action.
- Exploitation: none reported, no public PoC, not in the CISA Known Exploited Vulnerabilities catalog as of November 27, 2026.
- Action: update every RPC server host to b12658 or later, and keep the port away from any network that contains hosts you do not control.
What the RPC server accepts from a client
llama.cpp describes itself as "LLM inference in C/C++" and has about 136,000 stars on GitHub as of November 27, 2026. Its RPC (remote procedure call) backend splits one model across several machines: each worker runs ggml-rpc-server, and the main host starts llama-cli or llama-server with the --rpc option and offloads computation to the workers over TCP. Its own RPC README says the backend is at a "proof-of-concept development stage" and calls it "fragile and insecure".
The protocol was built for speed between cooperating machines, and it shows in how memory is named. A client asks the server to allocate a buffer with ALLOC_BUFFER, and the handle it gets back is the address of the server's buffer object:
response.remote_ptr = reinterpret_cast<uint64_t>(buffer);
response.remote_size = buffer->size;
ggml/src/ggml-rpc/ggml-rpc.cpp, lines 1569–1570, commit 46f4da2 (before the fix). The handle returned to the client is the buffer pointer itself.
A second command, BUFFER_GET_BASE, returns the address where that buffer's data begins:
void * base = ggml_backend_buffer_get_base(buffer);
response.base_ptr = reinterpret_cast<uint64_t>(base);
ggml/src/ggml-rpc/ggml-rpc.cpp, lines 1612–1613, commit 46f4da2 (before the fix).
Both values are real pointers in the server's address space, which means address space layout randomization (ASLR) hides nothing from a connected client. In the CVE record this is the first step of the attack: "Attackers can learn buffer bases with BUFFER_GET_BASE".
Tensors, the multidimensional arrays that hold weights and intermediate results, are described to the server by a packed structure called rpc_tensor. The client fills in every field: the type, the four dimensions in ne, the strides in nb, the buffer handle and a field named data, a raw 64-bit address that says where the tensor's bytes live. A copy command carries two such descriptions and nothing else:
struct rpc_msg_copy_tensor_req {
rpc_tensor src;
rpc_tensor dst;
};
ggml/src/ggml-rpc/ggml-rpc.cpp, lines 225–228, commit 46f4da2 (before the fix).
Everything that keeps COPY_TENSOR inside the buffers the client allocated therefore depends on how the server validates those two structures.
The bounds check in deserialize_tensor() skips empty tensors
Each rpc_tensor is turned into a server-side ggml_tensor by rpc_server::deserialize_tensor(). The function looks up the buffer handle in the set of buffers the server has allocated, then checks that the range starting at data lies inside that buffer. In builds b11450 through b12657 the check sits behind a second condition:
if (result->buffer && ggml_nelements(result) > 0) {
// require that the tensor data does not go beyond the buffer end
uint64_t tensor_size = (uint64_t) ggml_nbytes(result);
uint64_t buffer_start = (uint64_t) ggml_backend_buffer_get_base(result->buffer);
uint64_t buffer_size = (uint64_t) ggml_backend_buffer_get_size(result->buffer);
if (tensor->data + tensor_size < tensor->data ||
tensor->data < buffer_start || tensor->data + tensor_size > buffer_start + buffer_size) {
ggml/src/ggml-rpc/ggml-rpc.cpp, lines 1724–1730, commit 46f4da2 (before the fix). Line 1724 decides whether the check runs at all. The excerpt stops before the error log.
ggml_nelements() multiplies the four dimensions, so a single zero in ne makes the product zero and the whole block is skipped. Neither the test against buffer_start nor the test against the end of the buffer runs. A few statements later the function copies the address from the wire into the tensor without looking at it again:
result->data = reinterpret_cast<void *>(tensor->data);
ggml/src/ggml-rpc/ggml-rpc.cpp, line 1745, commit 46f4da2 (before the fix).
What comes out is a tensor object that points at a registered buffer through buffer and at an arbitrary location through data. For a tensor with no elements the developers evidently saw no harm in that, since there are no bytes to read or write through the pointer. That assumption holds only as long as every consumer sizes its access by the same tensor.
How the empty-tensor exemption entered b11450
The condition is seven weeks older than the fix. It arrived in commit a46709b, pull request #26610 "RPC: add -sm tensor", written by Aman Gupta with Georgi Gerganov as co-author, opened on August 5, 2026 and merged on October 6. Build b11450 was cut from that commit the same day, which is why the CVE record starts its affected range there. Only one hunk of it matters here:
- if (result->buffer) {
+ if (result->buffer && ggml_nelements(result) > 0) {
// require that the tensor data does not go beyond the buffer end
uint64_t tensor_size = (uint64_t) ggml_nbytes(result);
uint64_t buffer_start = (uint64_t) ggml_backend_buffer_get_base(result->buffer);
uint64_t buffer_size = (uint64_t) ggml_backend_buffer_get_size(result->buffer);
- GGML_ASSERT(tensor->data + tensor_size >= tensor->data); // check for overflow
- GGML_ASSERT(tensor->data >= buffer_start && tensor->data + tensor_size <= buffer_start + buffer_size);
+ if (tensor->data + tensor_size < tensor->data ||
+ tensor->data < buffer_start || tensor->data + tensor_size > buffer_start + buffer_size) {
+ GGML_LOG_ERROR("[%s] tensor '%s' (op %s, type %s, ne [%" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 "]) "
+ "data [0x%" PRIx64 ", 0x%" PRIx64 ") out of buffer bounds [0x%" PRIx64 ", 0x%" PRIx64 ")\n",
+ __func__, tensor->name, ggml_op_name((ggml_op) tensor->op), ggml_type_name(result->type),
+ result->ne[0], result->ne[1], result->ne[2], result->ne[3],
+ tensor->data, tensor->data + tensor_size, buffer_start, buffer_start + buffer_size);
+ return nullptr;
+ }
}
ggml/src/ggml-rpc/ggml-rpc.cpp, hunk starting at old line 1407, commit a46709b (the change that introduced the flaw, first released in b11450).
Two things changed at once. Until then the code checked every tensor that had a buffer and enforced the result with GGML_ASSERT, so a bad address aborted the whole server: a denial of service, but never a write. The new code replaces the abort with a logged error and a nullptr return, which keeps the server alive for the next request, and it adds the exemption for tensors with zero elements. In all, the pull request added 748 lines to this file for asynchronous graph computation, a custom all-reduce, a graph cache and 2D tensor transfers, and neither its description nor the commit message mentions the new condition.
We assess with moderate confidence that the exemption was a deliberate accommodation for legitimate empty tensors and not a slip. One indirect sign supports it: the rewritten function in b12658 keeps an equivalent exemption, so the maintainers still expect such tensors to arrive with pointers that do not need to lie in a buffer.
How copy_tensor() turns the gap into a write
rpc_server::copy_tensor() deserializes the source and the destination, rejects the request if either came back null or without a buffer, and then performs its own range check before copying:
uint64_t src_size = (uint64_t) ggml_nbytes(src);
uint64_t dst_data = (uint64_t) dst->data;
uint64_t dst_base = (uint64_t) ggml_backend_buffer_get_base(dst->buffer);
uint64_t dst_buf_sz = (uint64_t) ggml_backend_buffer_get_size(dst->buffer);
if (dst_data + src_size > dst_base + dst_buf_sz) {
ggml/src/ggml-rpc/ggml-rpc.cpp, lines 2101–2106, commit 46f4da2 (before the fix). Line 2106 is the only range check in the function.
The comparison catches a write that runs past the end of the destination buffer. It has no lower bound. Before b11450 it did not need one, because deserialize_tensor() had already asserted that data was at or above the buffer base. Once empty tensors bypass that assertion, a destination address below the base makes the left side of the comparison smaller, not larger, and the request goes through.
How many bytes are copied depends on the source alone. copy_tensor() hands both tensors to ggml_backend_buffer_copy_tensor(), which dispatches to the buffer type's own routine. For the CPU buffer type that routine is a bare memcpy:
static bool ggml_backend_cpu_buffer_cpy_tensor(ggml_backend_buffer_t buffer, const struct ggml_tensor * src, struct ggml_tensor * dst) {
GGML_ASSERT(src);
if (ggml_backend_buffer_is_host(src->buffer)) {
memcpy(dst->data, src->data, ggml_nbytes(src));
return true;
}
return false;
ggml/src/ggml-backend.cpp, lines 2875–2881, commit 46f4da2 (before the fix). Line 2878 performs the write.
The destination's element count, the one fact that made its pointer look harmless, is never consulted. Put together, the attack described in the CVE record follows this path through the code:
- The attacker connects to the RPC port and completes the
HELLOhandshake. No credentials are requested: the accept loop inggml_backend_rpc_start_server()passes each accepted socket straight torpc_serve_client()and serves one client at a time, taking the next connection only when the current one closes. - The attacker sends
ALLOC_BUFFERand receives the address of the buffer object as the handle, then sendsBUFFER_GET_BASEand receives the address of the buffer's data area. - The attacker places the bytes to be written into a normal, non-empty tensor inside a buffer it allocated. This is the source.
- The attacker sends
COPY_TENSOR. Its destination description carries a valid buffer handle, a zero in one of the four dimensions and adataaddress below the buffer base. deserialize_tensor()sees zero elements, skips the bounds check and assigns the address to the destination tensor.copy_tensor()adds the source size to that address, finds the sum below the end of the buffer and lets the request pass.memcpywritesggml_nbytes(src)bytes of attacker data at the attacker's address.
The CVE record speaks of writes to "arbitrary heap addresses". What the code enforces is less specific: the only constraint on the target is that the write must end at or before the end of the destination buffer, and nothing ties it to the heap. How a write becomes code execution is not stated in the record, and no technical report from the finder, Min P. Hong of SEWORKS, was public as of November 27, 2026. An earlier advisory for the same server, covering CVE-2026-34159, documented one route from a memory write to a shell: overwrite the iface.clear function pointer in a buffer object, then trigger it with BUFFER_CLEAR. That chain belongs to a different bug, but the handle it relied on is the same address ALLOC_BUFFER still returns.
What commit 03813c5 changes in copy_tensor()
The fix landed on November 23, 2026 as commit 03813c5, pull request #32651, by the same author who wrote the b11450 change. In copy_tensor() it deletes the hand-written comparison and replaces it with one call:
- if (src == nullptr || dst == nullptr || src->buffer == nullptr || dst->buffer == nullptr) {
- LOG_ERROR("[%s] error deserializing tensors\n", __func__);
- return false;
- }
-
- uint64_t src_size = (uint64_t) ggml_nbytes(src);
- uint64_t dst_data = (uint64_t) dst->data;
- uint64_t dst_base = (uint64_t) ggml_backend_buffer_get_base(dst->buffer);
- uint64_t dst_buf_sz = (uint64_t) ggml_backend_buffer_get_size(dst->buffer);
-
- if (dst_data + src_size > dst_base + dst_buf_sz) {
- LOG_ERROR("[%s] out-of-bounds write in rpc_server::copy_tensor:\n"
- " write range : [0x%" PRIx64 ", 0x%" PRIx64 "]\n"
- " buffer base: [0x%" PRIx64 ", 0x%" PRIx64 "]\n",
- __func__,
- dst_data,
- dst_data + src_size,
- dst_base,
- dst_base + dst_buf_sz);
+ if (src == nullptr || src->buffer == nullptr || !rpc_check_region(__func__, dst, 0, ggml_nbytes(src))) {
+ LOG_ERROR("[%s] invalid tensors\n", __func__);
return false;
}
ggml/src/ggml-rpc/ggml-rpc.cpp, copy_tensor() hunk starting at old line 2093, commit 03813c5 (the fix, first released in b12658).
The new helper, rpc_check_region(), first refuses a tensor that is null or has no buffer or no data, and then measures the requested range against the tensor instead of the buffer:
const uint64_t span = (n_copies - 1)*stride + size;
const uint64_t nbytes = ggml_nbytes(tensor);
if (offset > nbytes || span > nbytes - offset) {
LOG_ERROR("[%s] region (offset=%" PRIu64 ", span=%" PRIu64 ") out of tensor '%s' bounds (%" PRIu64 ")\n",
func, offset, span, tensor->name, nbytes);
return false;
}
ggml/src/ggml-rpc/ggml-rpc.cpp, lines 1518–1524, commit 03813c5 (the fix).
For COPY_TENSOR the offset is zero and the span is the byte size of the source, so the copy is allowed only if it fits inside ggml_nbytes(dst). That function answers the question for an empty destination in its first loop:
for (int i = 0; i < GGML_MAX_DIMS; ++i) {
if (tensor->ne[i] <= 0) {
return 0;
}
}
ggml/src/ggml.c, lines 1320–1324, commit 46f4da2 (unchanged by the fix).
An empty destination has a size of zero bytes, and a source of any positive size no longer fits in it. At this comparison the pointer trick stops working, whatever address the client supplies. Inside deserialize_tensor() the buffer check was rewritten too, and its helper now tests the lower bound explicitly and avoids the additions that could wrap around:
static bool rpc_in_buffer(ggml_backend_buffer_t buffer, uint64_t addr, uint64_t size) {
const uint64_t base = (uint64_t) ggml_backend_buffer_get_base(buffer);
const uint64_t buf_size = (uint64_t) ggml_backend_buffer_get_size(buffer);
return addr >= base && addr - base <= buf_size && size <= buf_size - (addr - base);
}
ggml/src/ggml-rpc/ggml-rpc.cpp, lines 1499–1503, commit 03813c5 (the fix).
We assess with high confidence that b12658 closes the write described in the CVE record. Our basis is the code path itself: a non-empty destination must pass rpc_in_buffer() with both bounds, an empty one cannot receive a single byte through rpc_check_region(), and copy_tensor() has no other route to the copy. Both checks are present in the same file on master as of November 27, 2026 (commit e7ec636) and in v1.1.0.
The commit touches one file, adds 513 lines and removes 747, and contains no tests. Its pull request reports testing on CPU servers, including a full pass of test-backend-ops through an RPC device using a local hook that is not part of the change, and states "Not tested yet: GPU servers, RDMA". Georgi Gerganov approved it after his own run "with 2x DGX Sparks + RDMA". The other reviewer, Radoslav Gerganov, wrote that he had found no regressions "so far" and added that he is "planning to add a CI job for the RPC backend soon", which indicates the backend had no CI job when the fix was reviewed.
The copy check is a small part of what the commit rewrites. According to the pull request description, deserialize_tensor() now rejects the values ggml_new_tensor would assert on (an out-of-range op, an ne[0] that is not a multiple of the block size, an element count that overflows) and computes the tensor size without overflow before the buffer check, in the new rpc_tensor_nbytes(). graph_compute builds the graph in one pass without recursion and refuses unknown or duplicate ids, duplicate nodes, sources sent after their users, compute nodes with unallocated operands and views outside their view_src buffer. SET_TENSOR, SET_TENSOR_2D and GRAPH_COMPUTE requests get header structs that are parsed by a bounds-checked rpc_reader.
Nothing in the pull request presents the change as a security fix. Its title is "rpc : typed request helpers and a single validation step on the server", and neither the description nor the commit message contains the words vulnerability or CVE or the finder's name. Stability is the stated motive for the new region check: "Master checks against the buffer, so a request inside the buffer but past the end of the tensor aborts the server." The description also carries the line "AI usage disclosure: YES, paired with Claude".
What the fix leaves in place
The exemption that caused the bug survives in a new spelling. After the rewrite, deserialize_tensor() computes the tensor's byte size from the wire values and still skips the buffer check when that size is zero:
ggml_backend_buffer_t buffer = reinterpret_cast<ggml_backend_buffer_t>(tensor->buffer);
if (buffer && buffers.find(buffer) == buffers.end()) {
buffer = nullptr;
}
if (buffer && nbytes > 0 && !rpc_in_buffer(buffer, tensor->data, nbytes)) {
ggml/src/ggml-rpc/ggml-rpc.cpp, lines 1833–1837, commit 03813c5 (the fix). The nbytes > 0 term on line 1837 is the surviving exemption. The excerpt stops before the error log.
A zero-element tensor with a valid handle and an arbitrary data address is therefore still accepted and still handed to the command handlers. What protects the server now is that each handler calls rpc_check_region() before touching memory. In the fixed file that call appears at eight places in seven handlers: memset_tensor(), set_tensor(), set_tensor_2d(), set_tensor_hash() (twice), get_tensor(), get_tensor_2d() and copy_tensor(). A future handler that forgets the call inherits the old problem.
Two design choices that made the bug easy to use are unchanged on master as of November 27, 2026 (commit e7ec636). alloc_buffer() and buffer_get_base() still return raw addresses to the client, the practice the CVE-2026-34159 advisory summed up as "Raw addresses are used as handles with no indirection table". Authentication is still absent from the protocol. Two later commits to the file, 4af4bb6 (pull request #32896, November 24) and 62d6c8c (pull request #30685, November 25), left the new checks intact.
Pull request #32651 itself points at how much validation work is still queued. It names seven open pull requests that overlap with it, six adding the same checks in place and #31217 changing ggml_nbytes() instead, and all seven were still open on November 27.
Open RPC hardening pull requests
Titles, dates and state come from the GitHub API on November 27, 2026.
| Pull request | Opened | Title |
|---|---|---|
| #25670 | July 14, 2026 | rpc : reject invalid top-level graph nodes in graph_compute |
| #30474 | October 13, 2026 | rpc : reject malformed tensor dims and op in deserialize_tensor |
| #31018 | October 23, 2026 | rpc : harden GRAPH_COMPUTE against crafted tensor descriptors |
| #31190 | October 26, 2026 | rpc : reject duplicate nodes in graph_compute |
| #31217 | October 26, 2026 | ggml-rpc: fix integer overflow in ggml_nbytes() leading to OOB read/w… (title cut off on GitHub) |
| #31322 | October 28, 2026 | rpc : validate 2d tensor stride and catch allocation errors |
| #31843 | November 7, 2026 | rpc : avoid stack exhaustion in create_node with deep graphs |
The data pointer has failed three times before
CVE-2026-137567 is the fourth CVE assigned to the same field of the same structure. On August 12, 2024 the project published two advisories, both fixed in b3561. CVE-2024-42478 was an arbitrary address read in rpc_server::get_tensor, and CVE-2024-42479 was a write-what-where in rpc_server::set_tensor with the summary "The unsafe data pointer member in the rpc_tensor structure can cause arbitrary address writing." In March 2026 came CVE-2026-34159, an unauthenticated remote code execution whose advisory opens with a sentence that could be reused today with one word changed: "The RPC backend's deserialize_tensor() skips all bounds validation when a tensor's buffer field is 0." That advisory says its bug "shares the same root cause as two previously patched CVEs" and names the 2024 pair. The new flaw is the same function skipping the same validation, this time when the element count is 0.
No project advisory exists for the new flaw. Of the 13 security advisories published in the repository, none covers CVE-2026-137567, and no GitHub issue describes the flaw either. VulnCheck assigned the number acting as the CVE Numbering Authority and credited Min P. Hong of SEWORKS, and the record gives November 20, 2026 as the date the issue became public. That is the day pull request #32651 was opened. NVD, the National Vulnerability Database, still showed the entry as "Awaiting Enrichment" on November 27 and had added no score of its own.
The project's security policy explains the silence. It tells reporters that fixes go straight into public pull requests:
The private security disclosure program is disabled until further notice. Please submit patches with fixes directly to the repo as public PRs. Emails will be ignored.
— llama.cpp SECURITY.md, master branch, November 27, 2026
The same document tells users who cannot isolate their deployment from untrusted networks not to use the RPC backend, ggml-rpc-server and llama-server functionality, and states that "none of the topics under Using llama.cpp securely are considered vulnerabilities in LLaMA C++". Its list of covered topics does include ggml/**/*, the tree that holds the RPC code, so the text pulls both ways. The reporter of CVE-2026-34159 read it as excluding RPC and wrote in that advisory that SECURITY.md "explicitly excludes RPC from vulnerability scope". Read that way, an RPC memory-safety bug reachable from the network is the operator's exposure to manage, and the two critical scores come from VulnCheck alone.
Affected versions and fixed builds
The CVE record marks llama.cpp as affected from b11450 up to, but not including, b12658. Only one path reaches the vulnerable function, the RPC server loop rpc_serve_client(), so the host at risk is the worker that runs ggml-rpc-server. A machine that runs llama-server or llama-cli without an RPC server process does not expose this path, even on an affected build. The copy routine shown above belongs to the CPU buffer type, and the CVE record does not distinguish between backends.
| Parameter | Value (source: CVE record unless noted) |
|---|---|
| Affected | llama.cpp b11450 through b12657 |
| Fixed | b12658, released November 24, 2026 (GitHub release, built from commit 03813c5) |
| Current release | v1.1.0, released November 26, 2026, contains the fix (GitHub compare: 116 commits ahead of 03813c5, 0 behind) |
| CVSS 4.0 | 9.3, 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 |
| CVSS 3.1 | 9.8, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Weakness | CWE-787, Out-of-bounds Write |
| Assigner and finder | VulnCheck (CNA), Min P. Hong (SEWORKS) |
| NVD | Awaiting Enrichment, no NVD score (NVD page, November 27, 2026) |
Release b12658 ships prebuilt binaries for macOS, Linux (CPU, CUDA, ROCm, Vulkan, SYCL, OpenVINO and s390x variants), Windows and Android, plus an Apple XCFramework. A build compiled from source can be checked without knowing its number. If ggml/src/ggml-rpc/ggml-rpc.cpp contains the function rpc_check_region and copy_tensor() calls it with dst, the tree has the fix. If the file contains the line if (result->buffer && ggml_nelements(result) > 0) {, the tree is in the vulnerable range.
Exposure depends on how the server was started. In tools/rpc/rpc-server.cpp the default host is 127.0.0.1 and the default port is 50052, but a worker that serves another machine has to be started with -H or --host set to a routable address. The server answers that choice with a banner on standard error and then proceeds:
if (params.host != "127.0.0.1") {
fprintf(stderr, "\n");
fprintf(stderr, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
fprintf(stderr, "WARNING: Host ('%s') is != '127.0.0.1'\n", params.host.c_str());
fprintf(stderr, " Never expose the RPC server to an open network!\n");
fprintf(stderr, " This is an experimental feature and is not secure!\n");
fprintf(stderr, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
fprintf(stderr, "\n");
}
tools/rpc/rpc-server.cpp, lines 208–216, commit 46f4da2 (before the fix).
A worker that another machine reaches directly, without a tunnel, has passed through this branch and has had the warning in its startup output ever since.
Reference numbers
| Item | Value | Source |
|---|---|---|
| Repository counters, November 27, 2026 | 136,468 stars, 26,161 forks, 902 watchers | GitHub API |
| Fix commit 03813c5 | 1 file, +513 / −747, 1,260 changed lines | GitHub API |
| Pull request #32651 | 2 commits (the second is "rpc : trim comments"), +515 / −749, 1 file | GitHub API |
| File length across the pull request | 3,432 lines before, 3,212 after, as stated in the description. The file itself has 3,428 lines at commit 46f4da2 and 3,194 at commit 03813c5 | PR #32651 description, repository files |
| Reported test run | test-backend-ops with an RPC device: 24801/24801 pass. Greedy generation identical to master on Qwen3-4B, gemma-4-E2B and Qwen3.5-9B (one server, layers split over two servers, old client with new server, new client with old server). -sm tensor over two servers and rpc-server -c match master. test-rpc-multi-server and test-rpc-unreachable pass |
PR #32651 description |
| Introducing commit a46709b | 3 files, +755 / −48: ggml-rpc.cpp +748 / −46, ggml-rpc.h +1 / −1, ggml-backend-meta.cpp +6 / −1 | GitHub API |
What to do
- Update the workers: install b12658 or later, or v1.1.0, on every host that runs
ggml-rpc-server, because the flawed check lives in the server side of the RPC code and a patched main host does nothing for an unpatched worker. - Verify source builds: search
ggml/src/ggml-rpc/ggml-rpc.cppforrpc_check_regionin any tree you compiled yourself, because a custom build does not always carry a release number and the function name is a reliable marker of the fix. - Find non-loopback servers: list every
ggml-rpc-serverprocess started with-Hor--host, because those are the instances the startup banner warned about and the ones reachable directly over the network. - Restrict the port: allow connections to port 50052 (or your custom port) only from the main host's address, because the fixed server still accepts any client without authentication and still hands out memory addresses.
- Do not read a clean log as proof: treat the absence of the message
out-of-bounds write in rpc_server::copy_tensoras meaningless, because vulnerable builds print it only when a request breaks the upper bound and this attack stays below the buffer. The project has published no indicators of compromise. - Review crashes since October: look at unexplained
ggml-rpc-serverexits on exposed workers between the b11450 upgrade and the fix, because the CVE record names a crash as one of the two outcomes of the write.
Timeline
| Date (UTC) | Event | Source |
|---|---|---|
| August 12, 2024 | Advisory for CVE-2024-42478, read through the data pointer in get_tensor |
GHSA-5vm9-p64x-gqw9 |
| August 12, 2024 | Advisory for CVE-2024-42479, write through the data pointer in set_tensor |
GHSA-wcr5-566p-9cwj |
| March 26, 2026 | Advisory for CVE-2026-34159, deserialize_tensor() skips validation when buffer is 0 |
GHSA-j8rj-fmpv-wcxw |
| August 5, 2026, 04:59 | Pull request #26610 opened | GitHub API |
| October 6, 2026, 15:25 | Pull request #26610 merged as commit a46709b, adding the zero-element exemption | GitHub API |
| October 6, 2026, 19:05 | Build b11450 released, first affected build | GitHub release |
| November 20, 2026, 09:20 | Pull request #32651 opened. The CVE record gives this day as the public date | GitHub API, CVE record |
| November 23, 2026, 10:00 | Radoslav Gerganov approves the pull request | GitHub API |
| November 23, 2026, 14:15 | Georgi Gerganov approves the pull request | GitHub API |
| November 23, 2026, 14:28 | Pull request #32651 merged as commit 03813c5 | GitHub API |
| November 24, 2026, 00:56 | Build b12658 released, first fixed build | GitHub release |
| November 26, 2026, 09:16 | v1.1.0 released | GitHub release |
| November 26, 2026, 12:50 | CVE-2026-137567 reserved by VulnCheck | CVE record |
| November 26, 2026, 13:13 | CVE record and VulnCheck advisory published | CVE record |
| November 27, 2026 | NVD entry still "Awaiting Enrichment" | NVD |
Conclusion
CVE-2026-137567 came from a guard that was loosened for a case that looked harmless, in a function that had already produced a remote code execution advisory eight months earlier for skipping the same check. What the code teaches is narrow and concrete: deserialize_tensor() vouched for the destination pointer on the strength of the destination's size, and copy_tensor() then sized the write by a different tensor. Commit 03813c5 fixes that mismatch by making the two sides use the same measure.
We assess with moderate confidence that more memory-safety fixes will land in ggml-rpc.cpp. Three signs point that way: the server still accepts zero-element tensors with unchecked pointers and relies on every handler to call the region check, seven hardening pull requests are waiting for review, and the backend had no CI job when the fix was approved. Administrators should also note how the patch became public. Its diff was open on GitHub for six days before a CVE record existed, under a title that says nothing about security, so anyone who tracks this project by CVE feeds alone learned about the bug two days after the first fixed build was out.
Sources
- VulnCheck advisory: llama.cpp b11450 before b12658 Out-of-Bounds Write via RPC copy_tensor
- CVE-2026-137567 record
- Fix commit 03813c5 and pull request #32651
- llama.cpp release b12658
- Commit a46709b and pull request #26610
- Vulnerable copy_tensor() at commit 46f4da2
- llama.cpp SECURITY.md and RPC README
- GHSA-j8rj-fmpv-wcxw (CVE-2026-34159) and GHSA-wcr5-566p-9cwj (CVE-2024-42479)
- GHSA-5vm9-p64x-gqw9 (CVE-2024-42478)
- NVD entry for CVE-2026-137567
- Contents are built when the page loads