CVE

llama.cpp RPC Check (CVE-2026-118375)

One validated HELLO handshake classifies llama.cpp RPC backends against CVE-2026-118375 and CVE-2026-34159, with no data-bearing RPC ever sent.

AuthorTrickest
100%

Notes on this workflow

Results: rpc_exposed / not_rpc / error. Build mapping (numeric b-number compare): <b8492 -> 34159 affected (CRITICAL, public PoC chain), 118375 unverified; b8492..b11864 -> 118375 affected (HIGH, crash reliable, RCE possible, RDMA peers prioritized); >=b11865 -> clean; no build -> both unverified (HIGH). One row per host plus an exploded per-host-per-CVE cve_exposure.jsonl. Remediation: upgrade to b11865+, bind 50052 to loopback/private, firewall to trusted peers; long-exposed affected builds treated as potentially compromised (forensic triage). Neither CVE is in KEV; EPSS 1.32%/0.69%.

Target: hosts with a llama.cpp RPC backend (rpc-server, or llama-server/llama-cli with --rpc) on TCP 50052 or an inventory-listed RPC port. The RPC protocol has no authentication — any TCP client can talk to it. Targets carry optional inventory rows (host, build) since the protocol discloses no version.

Overview: exposure fingerprint for the llama.cpp ggml-rpc backend covering CVE-2026-118375 (RDMA stack overflow) and CVE-2026-34159 (buffer=0 pre-auth RCE) with one shared probe. 4-node chain, fail-closed, JSONL outputs. Detection is exposure-only: for memory-corruption bugs any deeper probe is the exploit, so the honest output is 'unauthenticated RPC exposed, builds X-Y affected' — patch on exposure plus inventory build number.

How it works: per host, one TCP connect to 50052, then exactly one well-formed HELLO handshake (cmd 14, 8-byte LE size 24, 24 zero capability bytes — the frame a plain llama.cpp TCP client sends, verified against ggml-rpc.cpp/transport.h). A structurally valid response (major.minor.patch + caps) confirms the backend. Non-zero response caps = RDMA advertised = 118375 candidate regardless of build. Single retry on transport error, then stop. MEMORY-CORRUPTION PRIMITIVES NEVER SENT: the guard rejects any bytes except the HELLO constant; GRAPH_COMPUTE/SET_TENSOR/ALLOC_BUFFER/BUFFER_CLEAR/RDMA data messages are the 34159 RCE chain and the 118375 trigger.

Overview

This workflow classifies llama.cpp RPC backends against two memory-corruption flaws that share one network surface. CVE-2026-34159 is the sharper of the two: a zero-length buffer bypass in tensor deserialization that reaches arbitrary read and write, covered by a public proof-of-concept chain that defeats ASLR and ends in code execution, which puts it in the CRITICAL tier for AI infrastructure despite being an internal-surface bug by design. CVE-2026-118375 is the stack overflow in the RDMA receive path, affecting builds from b8841 up to the fix at b11865. The workflow never triggers either: the only bytes it sends are one structurally validated HELLO handshake, the same frame a plain-TCP llama.cpp client sends, and every data-bearing RPC command that constitutes the exploit chains is refused by construction. Field data shows no exposed instances so far, which is context, not a clean bill. Each host comes back with a verdict you can feed into exposure management.

Pipeline

  1. Read the target list and make one TCP connection per host, with a single retry on transport error, and send exactly one HELLO handshake: one command byte, a length field, and a zeroed capability vector for a plain-TCP client.
  2. The response reveals the protocol version and whether the peer advertised RDMA capability. Nonzero capability bits mean the RDMA transport is in play, which makes the host a CVE-2026-118375 candidate regardless of build number.
  3. The guard permits only the HELLO constant: graph-compute, tensor-set, buffer-allocation, and base-pointer commands, the exact primitives of both exploit chains, are unconstructible. No fuzzing, no banner bytes, no version probing through unexpected message types.
  4. Map the build from the HELLO response or your inventory: below b8492, CVE-2026-34159 is affected and the older CVE is unverified; from b8492 to b11865, only the RDMA CVE applies; at b11865 and later, neither.
  5. Reconcile one verdict per target with per-CVE states, and write findings plus summary counts. Without inventory, both CVEs read as version-unverified exposure.

Inputs

  • Target list. llama.cpp RPC endpoint addresses, with optional ports, that you are authorized to test. The default file ships a sample host; bind your own.
  • Inventory file. Optional. Host-to-build rows from your asset system; llama.cpp builds are b-numbers compared numerically.

Outputs

  • findings.jsonl. One row per host: target, the handshake result and protocol version, whether RDMA was advertised, the build and its per-CVE states, verdict, and severity.
  • summary.jsonl. One line with the total, verdict counts, per-CVE rows, and the note that one upgrade resolves both CVEs.

Integrations

  • TCP. One connection and one validated HELLO handshake per host, single retry on transport error, nothing else on the wire.

Sample output

The records below are illustrative and do not come from a real run. They show a build where both CVEs apply, one where only the RDMA CVE applies, and a peer advertising RDMA.

targetportrpc_confirmedproto_versionbuildrdma_advertisedcve_34159cve_118375verdictdetailerror
gpu-a.example.com50052trueb8402b8402falseaffectedunverifiedrpc_exposedunauthenticated RPC backend answered HELLO; build below b8492 so the buffer=0 RCE appliesnull
gpu-b.example.org50052trueb9000b9000falsepatchedaffectedrpc_exposedRDMA overflow window applies between b8492 and b11865null
gpu-c.example.net50052trueb9000b9000truepatchedaffectedrpc_exposedpeer advertised RDMA capability; a CVE-2026-118375 candidate regardless of buildnull
{"cves": ["CVE-2026-118375", "CVE-2026-34159"], "product": "llama.cpp ggml-rpc backend", "total_targets": 3, "verdict_counts": {"rpc_exposed": 3}, "kev": false, "field_context": "no exposed instances observed in field data so far", "note": "one upgrade, build b11865, resolves both CVEs; keep the RPC surface off untrusted networks"}

FAQ

Is the RPC backend meant to be network-reachable?

Treat it as an internal surface by design. The backend exists to let a frontend use remote accelerators on a trusted segment, and neither advisory describes internet-facing exploitation. The field data has found no exposed instances so far. Anything listening beyond that segment is a misconfiguration worth fixing on its own.

Why is CVE-2026-34159 the CRITICAL tier?

Its advisory publishes a working proof-of-concept chain: the zero-length buffer bypass reaches arbitrary read and write, defeats ASLR, and ends in code execution through a legitimate RPC command. The automatable flag is set. That maturity, against a pre-auth network service, is what earns the tier.

How does the HELLO handshake decide anything?

The handshake returns the protocol version and the peer's capability bits. The version maps to the build, which decides each CVE's state, and nonzero capability bits mean the RDMA transport is in play, which makes the host a CVE-2026-118375 candidate whatever its build. No memory-corruption primitive is ever exercised.

What builds are affected?

CVE-2026-34159 affects builds before b8492. CVE-2026-118375 affects builds from b8841 to b11865. Build b11865 and later clears both. Builds are b-numbers compared numerically, and without inventory the workflow reports both as unverified rather than guessing.

Get a personalized demo

See Trickest in Action

A 30-minute walkthrough. We map the platform to your stack and answer pricing and deployment questions for your environment.