A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-39421

CVE-2026-39421: Maxkb Maxkb Sandbox Escape RCE Vulnerability

CVE-2026-39421 is a sandbox escape RCE vulnerability in Maxkb versions 2.7.1 and below. Attackers with workspace privileges can bypass LD_PRELOAD-based protections using ctypes for arbitrary code execution. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: May 14, 2026

CVE-2026-39421 Overview

CVE-2026-39421 is a sandbox escape vulnerability in MaxKB, an open-source enterprise AI assistant developed by 1Panel. The flaw affects the ToolExecutor component in versions 2.7.1 and below. An authenticated attacker with workspace privileges can bypass the LD_PRELOAD-based sandbox.so module by issuing raw system calls through Python's ctypes library. Successful exploitation leads to arbitrary code execution, network exfiltration, and container compromise. The maintainers fixed the issue in version 2.8.0.

Critical Impact

Authenticated attackers can escape the MaxKB Python sandbox to achieve arbitrary code execution and full container compromise via direct kernel system calls.

Affected Products

  • MaxKB versions 2.7.1 and earlier
  • 1Panel-dev MaxKB ToolExecutor component
  • Deployments relying on the sandbox.soLD_PRELOAD module

Discovery Timeline

  • 2026-04-14 - CVE-2026-39421 published to NVD
  • 2026-04-20 - Last updated in NVD database

Technical Details for CVE-2026-39421

Vulnerability Analysis

MaxKB executes user-supplied Python tool code inside a sandbox enforced by a preloaded shared object, sandbox.so. The library intercepts standard library functions such as execve, system, connect, and open through LD_PRELOAD hooks. It also intercepts mprotect to block PROT_EXEC allocations within sandboxed Python processes. The classification aligns with [CWE-94] Improper Control of Generation of Code.

The enforcement model assumes attackers route operations through libc. Python's ctypes module breaks that assumption by allowing direct invocation of the kernel syscall interface. Attackers bypass every libc-level hook by issuing the equivalent raw syscall numbers instead.

The sandbox also fails to intercept pkey_mprotect, a memory-protection syscall functionally equivalent to mprotect. An attacker can mark memory pages executable through pkey_mprotect and load shellcode without triggering the mprotect hook.

Root Cause

The sandbox enforces policy at the libc symbol layer rather than at the syscall boundary. Hook coverage is incomplete because pkey_mprotect (SYS_pkey_mprotect) is not intercepted, while mprotect is. Combined with unrestricted access to ctypes, sandboxed code can issue arbitrary syscalls directly to the kernel.

Attack Vector

An attacker with workspace privileges submits Python tool code that loads libc through ctypes.CDLL and calls syscall() directly with numbers for execve, connect, socket, or open. Because these calls bypass the preloaded symbol table, no sandbox.so policy applies. The attacker then uses pkey_mprotect to map executable memory, stages shellcode, and pivots to network exfiltration or container escape.

python
# Patch excerpt - apps/common/utils/tool_code.py
# Adds SANDBOX_PYTHON_ALLOW_DL_OPEN gating in the Python-side config loader
os.remove(sandbox_conf_file_path)
banned_hosts = CONFIG.get("SANDBOX_PYTHON_BANNED_HOSTS", '').strip()
allow_dl_paths = CONFIG.get("SANDBOX_PYTHON_ALLOW_DL_PATHS", '').strip()
allow_dl_open = CONFIG.get("SANDBOX_PYTHON_ALLOW_DL_OPEN", '0')
allow_subprocess = CONFIG.get("SANDBOX_PYTHON_ALLOW_SUBPROCESS", '0')
allow_syscall = CONFIG.get("SANDBOX_PYTHON_ALLOW_SYSCALL", '0')

Source: GitHub Commit 479701a

c
// Patch excerpt - installer/sandbox.c
// Adds dlopen gating and execinfo support to harden the LD_PRELOAD module
#include <pty.h>
#include <stdint.h>
#include <stdbool.h>
#include <execinfo.h>

#define CONFIG_FILE ".sandbox.conf"
#define KEY_BANNED_HOSTS       "SANDBOX_PYTHON_BANNED_HOSTS"
#define KEY_ALLOW_DL_PATHS     "SANDBOX_PYTHON_ALLOW_DL_PATHS"
#define KEY_ALLOW_DL_OPEN      "SANDBOX_PYTHON_ALLOW_DL_OPEN"
#define KEY_ALLOW_SUBPROCESS   "SANDBOX_PYTHON_ALLOW_SUBPROCESS"
#define KEY_ALLOW_SYSCALL      "SANDBOX_PYTHON_ALLOW_SYSCALL"

static char *banned_hosts = NULL;
static char *allow_dl_paths = NULL;
static int   allow_dl_open = 0;
static int   allow_subprocess = 0;
static int   allow_syscall = 0;

Source: GitHub Commit 479701a

Detection Methods for CVE-2026-39421

Indicators of Compromise

  • Outbound network connections from MaxKB worker containers to unexpected hosts not on the SANDBOX_PYTHON_BANNED_HOSTS allowlist
  • Child processes spawned by the MaxKB Python tool runtime that resemble shells (sh, bash, /bin/busybox) or interpreters
  • Tool code submissions containing references to ctypes.CDLL, libc.so.6, syscall, or pkey_mprotect

Detection Strategies

  • Inspect MaxKB tool execution logs for Python imports of ctypes combined with raw syscall() invocations
  • Apply Linux audit rules (auditd) on the pkey_mprotect, execve, and connect syscalls within MaxKB container PID namespaces
  • Correlate sandbox process forks with unexpected file writes under /tmp, /dev/shm, or workspace directories

Monitoring Recommendations

  • Forward MaxKB application and container runtime logs to a central analytics platform for behavioral baselining
  • Monitor MaxKB container egress traffic at the network layer to detect exfiltration that bypasses application-level controls
  • Alert on version banners reporting MaxKB releases at or below 2.7.1 across the environment

How to Mitigate CVE-2026-39421

Immediate Actions Required

  • Upgrade MaxKB to version 2.8.0 or later, which adds SANDBOX_PYTHON_ALLOW_DL_OPEN gating and removes the pkey_mprotect bypass
  • Restrict workspace privileges to trusted operators until the upgrade is complete
  • Audit all custom Python tools for use of ctypes, cffi, or direct syscall invocations

Patch Information

The maintainers released the fix in MaxKB 2.8.0. Review the GitHub Security Advisory GHSA-9c6w-j7w5-3gf7, the GitHub Release v2.8.0 notes, and the remediation commit 479701a for full implementation details.

Workarounds

  • Run MaxKB worker processes inside a container with a strict seccomp profile that denies pkey_mprotect, mprotect with PROT_EXEC, and unauthorized network syscalls
  • Drop Linux capabilities and enforce a read-only root filesystem on MaxKB containers to limit post-exploitation impact
  • Apply egress firewall rules at the container network layer to block direct outbound connections from sandboxed tool processes
bash
# Example seccomp denylist additions for MaxKB worker containers
# Apply via docker run --security-opt seccomp=/path/to/maxkb-seccomp.json
{
  "defaultAction": "SCMP_ACT_ALLOW",
  "syscalls": [
    {
      "names": ["pkey_mprotect", "pkey_alloc", "pkey_free"],
      "action": "SCMP_ACT_ERRNO"
    },
    {
      "names": ["execve", "execveat"],
      "action": "SCMP_ACT_ERRNO"
    }
  ]
}

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMaxkb

  • SeverityHIGH

  • CVSS Score7.4

  • EPSS Probability0.09%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Release v2.8.0
  • Vendor Resources
  • GitHub Commit Change

  • GitHub Security Advisory GHSA-9c6w-j7w5-3gf7
  • Related CVEs
  • CVE-2026-39424: MaxKB Chat Export RCE Vulnerability

  • CVE-2026-39420: MaxKB Sandbox Escape RCE Vulnerability

  • CVE-2026-39417: MaxKB AI Assistant RCE Vulnerability

  • CVE-2025-64511: Maxkb RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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