CVE-2026-79919
LD_PRELOAD sandbox bypass via ctypes.CDLL in import hook, enabling file, exec, network access.
- CVSS 6.3
- CWE-693
- Design Defects
- Remote
MaxKB is an open-source AI assistant for enterprise. Prior to version 2.10.6-lts, function-library code running under the LD_PRELOAD sandbox can invoke ctypes.CDLL from an importlib.abc.MetaPathFinder callback so the dlopen call-stack heuristic sees a Python import frame, then use unhooked dlsym with RTLD_NEXT to resolve glibc's real syscall and bypass the sandbox syscall blacklist. An authenticated workspace member can consequently read or write files, execute processes, or access networks as the sandbox user. This issue is fixed in version 2.10.6-lts.
- CWE
- CWE-693
- CVSS base score
- 6.3
- Published
- 2026-09-21
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Design Defects
- Subcategory
- Poorly Designed Access Controls
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- MaxKB
- Fixed by upgrading
- Yes
Solution
Upgrade MaxKB to version 2.10.6‑lts.
Vulnerable code sample
import importlib.abc
import importlib.util
import sys
class SandboxFinder(importlib.abc.MetaPathFinder):
def find_spec(self, fullname, path, target=None):
# VULNERABLE: loads ctypes.CDLL in import hook allowing dlopen bypass
import ctypes
ctypes.CDLL("libc.so.6", mode=ctypes.RTLD_GLOBAL)
return None
# Register the finder to simulate the vulnerable environment
sys.meta_path.insert(0, SandboxFinder())Patched code sample
import importlib.abc
import importlib.util
import sys
class SandboxFinder(importlib.abc.MetaPathFinder):
def find_spec(self, fullname, path, target=None):
# FIX: avoid loading arbitrary native libraries in import hook
return None
# Register the hardened finder
sys.meta_path.insert(0, SandboxFinder())Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- security: fix dlopen bypass. (1Panel-dev/MaxKB)
apps/common/utils/tool_code.py · ToolExecutor.init_sandbox_dir
Cite this entry
@misc{vaitp:cve202679919,
title = {{LD_PRELOAD sandbox bypass via ctypes.CDLL in import hook, enabling file, exec, network access.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-79919},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-79919/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
