llama.cpp ggml RPC Server Out-of-Bounds Write (CVE-2026-137567)
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.
Vulnerability Intelligence
TheoreticalWeakness (CWE)
Timeline
- Disclosed
- November 26, 2026
References & Proof of Concept
- 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
CVSS
What is CVE-2026-137567 llama.cpp ggml RPC Server Out-of-Bounds Write (CVE-2026-137567)?
llama.cpp ggml RPC Server Out-of-Bounds Write (CVE-2026-137567) (CVE-2026-137567) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for llama.cpp ggml RPC Server Out-of-Bounds Write (CVE-2026-137567), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Execution
// df00tech DF00-8e571e1859 · https://df00tech.com/detections/CVE-2026-137567 · licence: https://df00tech.com/detections/licence
// Detect inbound connections to the llama.cpp ggml RPC server (default port 50052) and anomalous crashes
let rpcPorts = dynamic([50052]);
DeviceNetworkEvents
| where ActionType == "InboundConnectionAccepted"
| where LocalPort in (rpcPorts) or RemotePort in (rpcPorts)
| where InitiatingProcessFileName in~ ("rpc-server","rpc-server.exe","llama-server","llama-server.exe","ggml-rpc")
| project Timestamp, DeviceName, InitiatingProcessFileName, RemoteIP, RemotePort, LocalIP, LocalPort, InitiatingProcessCommandLine
| join kind=leftouter (
DeviceProcessEvents
| where FileName in~ ("rpc-server","rpc-server.exe","llama-server","llama-server.exe")
| where ProcessCommandLine has_any ("--rpc","-rpc","ggml-rpc")
| project DeviceName, ProcCmd=ProcessCommandLine, ProcTime=Timestamp
) on DeviceName
| summarize ConnCount=count() by DeviceName, RemoteIP, InitiatingProcessFileName, bin(Timestamp, 5m)
| where ConnCount > 0 Surfaces inbound connections to the ggml RPC listener and correlates them with the rpc-server/llama-server process that exposes CVE-2026-137567.
Data Sources
Required Tables
False Positives
- Legitimate distributed inference clusters where worker nodes intentionally run the ggml RPC server on an internal network
- Internal benchmarking or load-testing tools connecting to the RPC port
- Monitoring/health-check probes targeting port 50052
Query fingerprint DF00-8e571e1859 · licence
Sigma logsource & community rules
The detection logic for llama.cpp ggml RPC Server Out-of-Bounds Write (CVE-2026-137567) (CVE-2026-137567) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-137567
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
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.
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.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Initial Access
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040