Detect llama.cpp ggml RPC Server Out-of-Bounds Write (CVE-2026-137567) in Splunk
Detects exploitation attempts and exposure of the ggml RPC server in llama.cpp builds b11450 through b12657 (fixed in b12658), which contains an out-of-bounds write (CWE-787) in the RPC copy-tensor handler. The RPC server accepts unauthenticated connections and deserializes attacker-controlled tensor metadata. An attacker can learn buffer base addresses with BUFFER_GET_BASE, then send a COPY_TENSOR request with a zero-element destination tensor pointing below the buffer base to write to an arbitrary heap address, enabling memory corruption and potential remote code execution. Detection focuses on network exposure of the default RPC port (50052), anomalous process crashes of the rpc-server/llama-server binary, and unauthenticated inbound connections to the RPC listener.
MITRE ATT&CK
- Tactic
- Initial Access Execution
SPL Detection Query
``` df00tech DF00-8e571e1859 · https://df00tech.com/detections/CVE-2026-137567 · licence: https://df00tech.com/detections/licence ```
index=* (sourcetype="linux:netflow" OR sourcetype="stream:tcp" OR sourcetype="pan:traffic") (dest_port=50052 OR src_port=50052)
| eval svc=case(dest_port==50052,"rpc-listener",src_port==50052,"rpc-source")
| stats count values(src_ip) as src_ip values(dest_ip) as dest_ip dc(src_ip) as uniq_src by dest_ip dest_port svc
| where count > 0
| append [ search index=* sourcetype="linux:syslog" ("rpc-server" OR "llama-server" OR "ggml-rpc") ("segfault" OR "SIGSEGV" OR "out of bounds" OR "heap corruption" OR "general protection")
| stats count as crash_count by host ]
| sort - count Identifies traffic to the ggml RPC port 50052 and correlates with crash/segfault log lines from the vulnerable server process.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Sanctioned distributed llama.cpp inference backends on internal segments
- Vulnerability scanners probing port 50052
- Kernel segfaults unrelated to the RPC server coincidentally matching log keywords
Other platforms for CVE-2026-137567
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Expose ggml RPC server on default port (lab)
Expected signal: Listening socket on 0.0.0.0:50052 and inbound NetworkConnection events to the rpc-server process.
- Test 2 Unauthenticated TCP connection to RPC listener
Expected signal: Inbound connection-accepted event on port 50052 recorded by EDR/network sensors.
- Test 3 Send malformed copy-tensor-style RPC payload (lab)
Expected signal: RPC server segfault/core dump in dmesg/syslog correlated with the inbound connection.
References (5)
- https://github.com/ggml-org/llama.cpp/blob/46f4da217419ecac95708600e0f6ebc4bdb91cfd/ggml/src/ggml-rpc/ggml-rpc.cpp#L2083-L2122
- https://github.com/ggml-org/llama.cpp/commit/03813c56e47f6cd7a9b9bc2ad8edcebed88ce342
- https://github.com/ggml-org/llama.cpp/pull/32651
- https://github.com/ggml-org/llama.cpp/releases/tag/b12658
- https://www.vulncheck.com/advisories/llama-cpp-b11450-before-b12658-out-of-bounds-write-via-rpc-copy-tensor
Response Playbook
Triage
- Identify the affected host and confirm the running llama.cpp build version (check `rpc-server --version` or release tag); flag any build in the range b11450 through b12657 as vulnerable.
- Determine whether the ggml RPC server port (default 50052) is reachable from untrusted networks by reviewing firewall rules and listening-socket inventory (`ss -ltnp | grep 50052`).
- Correlate the source IP(s) of inbound RPC connections against known-good distributed-inference worker/client inventory; treat any external or unexpected source as suspicious.
- Review process-crash, segfault, and core-dump artifacts on the host around the time of the connection for signs of successful memory corruption.
Containment
- Restrict access to port 50052 to trusted management/inference subnets via host and network firewall rules, or bind the RPC server to localhost only.
- Stop the exposed rpc-server/llama-server process if it is internet-facing and not required, pending upgrade to b12658 or later.
Evidence Collection
- Capture a full packet capture of traffic to port 50052 and preserve any RPC request payloads for the copy-tensor handler.
- Collect core dumps, process memory, and system logs (dmesg/syslog) referencing rpc-server/llama-server crashes.
- Preserve the llama.cpp binary and build metadata to confirm the vulnerable version.
Escalation Criteria
- !Escalate to incident response if a crash/core dump coincides with an external inbound RPC connection, indicating probable exploitation of the OOB write.
- !Escalate if follow-on activity (new child processes, outbound C2, or persistence) is observed from the host running the RPC server.
Investigation Guide
Forensic Artifacts
- >
Core dumps and segfault entries in dmesg/syslog for rpc-server/llama-server - >
Packet captures of RPC copy-tensor requests to port 50052 - >
llama.cpp build/version metadata and release tag - >
Listening-socket records binding port 50052
Tuning Guidance
Baseline legitimate distributed-inference worker and client IPs and exclude them from alerting, focusing on connections from outside the trusted inference subnet. Prioritize alerts that correlate inbound RPC connections with process crashes. If the RPC server is intentionally exposed, reduce severity for internal sources but keep critical alerting for external/unknown sources until all hosts are upgraded to b12658+.
Hunting Queries
Enumerate all hosts exposing or receiving traffic on the ggml RPC port 50052 to scope exposure.
// df00tech DF00-8e571e1859 · https://df00tech.com/detections/CVE-2026-137567 · licence: https://df00tech.com/detections/licence
DeviceNetworkEvents | where LocalPort == 50052 or RemotePort == 50052 | summarize by DeviceName, InitiatingProcessFileName, RemoteIP, LocalPort ``` df00tech DF00-8e571e1859 · https://df00tech.com/detections/CVE-2026-137567 · licence: https://df00tech.com/detections/licence ```
index=* (dest_port=50052 OR src_port=50052) | stats count by dest_ip src_ip dest_port Atomic Red Team Tests
Start a vulnerable-range llama.cpp rpc-server bound to all interfaces to validate network-exposure detection.
Command
./rpc-server -H 0.0.0.0 -p 50052 & Cleanup
pkill -f 'rpc-server' || true Expected Telemetry
Listening socket on 0.0.0.0:50052 and inbound NetworkConnection events to the rpc-server process.
Expected Detection
KQL/SPL/CQL network rules flag inbound connections to port 50052 from the rpc-server process.
Establish a raw TCP connection to the ggml RPC port to simulate unauthenticated client probing.
Command
timeout 5 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/50052' ; echo connected Cleanup
true Expected Telemetry
Inbound connection-accepted event on port 50052 recorded by EDR/network sensors.
Expected Detection
Network and EDR rules record an unauthenticated connection to the vulnerable RPC listener.
Send an oversized/garbage payload to the RPC port to simulate a crafted copy-tensor request and induce a crash in a lab build.
Command
python3 -c "import socket; s=socket.socket(); s.connect(('127.0.0.1',50052)); s.sendall(b'\xff'*4096); s.close()" Cleanup
pkill -f 'rpc-server' || true Expected Telemetry
RPC server segfault/core dump in dmesg/syslog correlated with the inbound connection.
Expected Detection
Correlation rules flag an inbound RPC connection followed by abnormal rpc-server termination.