The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-34159

CVE-2026-34159: llama.cpp RPC Backend RCE Vulnerability

CVE-2026-34159 is a remote code execution vulnerability in llama.cpp RPC backend that allows unauthenticated attackers to read and write arbitrary process memory. This article covers technical details, affected versions, and mitigation.

Published: April 2, 2026

CVE-2026-34159 Overview

A critical remote code execution vulnerability has been identified in llama.cpp, a popular C/C++ inference library for large language models. Prior to version b8492, the RPC backend's deserialize_tensor() function skips all bounds validation when a tensor's buffer field is set to 0. This allows an unauthenticated attacker to read and write arbitrary process memory via crafted GRAPH_COMPUTE messages, ultimately achieving remote code execution without any authentication requirement.

Critical Impact

Unauthenticated attackers with TCP access to the RPC server port can achieve full ASLR bypass and remote code execution by combining pointer leaks from ALLOC_BUFFER/BUFFER_GET_BASE with arbitrary memory read/write capabilities.

Affected Products

  • llama.cpp versions prior to b8492
  • llama.cpp RPC backend deployments with exposed TCP ports
  • Any system running vulnerable llama.cpp RPC server accessible over network

Discovery Timeline

  • 2026-04-01 - CVE-2026-34159 published to NVD
  • 2026-04-01 - Last updated in NVD database

Technical Details for CVE-2026-34159

Vulnerability Analysis

This vulnerability is classified under CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer). The flaw exists in the RPC backend's tensor deserialization logic, which fails to properly validate tensor buffer pointers before performing memory operations. When a specially crafted message sets the tensor buffer field to 0 (null), the code path bypasses critical bounds checking, allowing arbitrary memory access.

The attack is particularly severe because it requires no authentication - any attacker with TCP connectivity to the RPC server port can exploit this vulnerability. The combination of ALLOC_BUFFER and BUFFER_GET_BASE operations allows attackers to leak pointer information, defeating Address Space Layout Randomization (ASLR) protections. Once ASLR is bypassed, the arbitrary read/write primitive enables full remote code execution.

Root Cause

The root cause is a missing null pointer check in the deserialize_tensor() function within the RPC backend. The function fails to validate that the tensor's buffer pointer is valid before proceeding with memory operations, allowing attackers to manipulate memory access through carefully crafted GRAPH_COMPUTE messages with a buffer field set to 0.

Attack Vector

The attack is network-based and requires no user interaction or privileges. An attacker must have TCP access to the RPC server port. The attack sequence involves:

  1. Establishing a TCP connection to the llama.cpp RPC server
  2. Sending ALLOC_BUFFER and BUFFER_GET_BASE messages to leak pointer information and bypass ASLR
  3. Crafting a malicious GRAPH_COMPUTE message with the tensor buffer field set to 0
  4. Exploiting the missing bounds validation to perform arbitrary memory read/write operations
  5. Achieving remote code execution by overwriting critical memory structures

The following patch was applied to address this vulnerability:

cpp
     const rpc_tensor * tensor = it_ptr->second;
 
     struct ggml_tensor * result = deserialize_tensor(ctx, tensor);
-    if (result == nullptr) {
+    if (result == nullptr || result->buffer == nullptr) {
+        GGML_LOG_ERROR("[%s] invalid tensor: null %s (id=%" PRIu64 ")\n",
+                       __func__, result == nullptr ? "tensor" : "buffer", id);
         return nullptr;
     }
     tensor_map[id] = result;

Source: GitHub Commit

Detection Methods for CVE-2026-34159

Indicators of Compromise

  • Unusual TCP connections to llama.cpp RPC server ports from untrusted sources
  • Abnormal GRAPH_COMPUTE messages containing tensors with null buffer fields
  • Memory access violations or crashes in the llama.cpp process
  • Unexpected process behavior or child process spawning from the RPC server

Detection Strategies

  • Monitor network traffic for malformed RPC messages targeting llama.cpp services
  • Implement application-level logging for ALLOC_BUFFER, BUFFER_GET_BASE, and GRAPH_COMPUTE operations
  • Deploy memory integrity monitoring to detect unauthorized memory access patterns
  • Use intrusion detection systems with rules for detecting RCE exploitation attempts

Monitoring Recommendations

  • Enable verbose logging in llama.cpp RPC backend to capture tensor deserialization errors
  • Monitor for the specific error message: "invalid tensor: null buffer"
  • Track connection patterns to RPC server ports for reconnaissance activity
  • Implement network segmentation to limit exposure of RPC services

How to Mitigate CVE-2026-34159

Immediate Actions Required

  • Upgrade llama.cpp to version b8492 or later immediately
  • Restrict network access to RPC server ports using firewall rules
  • Implement network segmentation to isolate LLM inference services
  • Audit logs for any indicators of exploitation attempts

Patch Information

The vulnerability has been patched in llama.cpp version b8492. The fix adds an explicit null check for the tensor buffer pointer in the deserialize_tensor() function, preventing the bypass of bounds validation. For detailed patch information, refer to the GitHub Pull Request #20908 and the GitHub Security Advisory.

Workarounds

  • Block external access to llama.cpp RPC server ports at the network perimeter
  • Deploy RPC services only on localhost or trusted internal networks
  • Use VPN or SSH tunneling for remote access to RPC services instead of direct exposure
  • Implement additional network-level authentication in front of RPC services
bash
# Example: Restrict RPC server port access using iptables
iptables -A INPUT -p tcp --dport <rpc_port> -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p tcp --dport <rpc_port> -s <trusted_network>/24 -j ACCEPT
iptables -A INPUT -p tcp --dport <rpc_port> -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechLlama Cpp

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.13%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-119
  • Technical References
  • GitHub Commit Summary

  • GitHub Pull Request

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-33298: llama.cpp Integer Overflow RCE Vulnerability

  • CVE-2026-21869: llama.cpp RCE Vulnerability

  • CVE-2026-27940: llama.cpp Buffer Overflow Vulnerability

  • CVE-2026-2069: llama.cpp Buffer Overflow Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English