CVE-2026-39421: MaxKB: Sandbox escape via ctypes and unhooked SYS_pkey_mprotect
MaxKB is an open-source AI assistant for enterprise. Versions 2.7.1 and below contain a sandbox escape vulnerability in the ToolExecutor component. By leveraging Python's ctypes library to execute raw system calls, an authenticated attacker with workspace privileges can bypass the LDPRELOAD-based sandbox.so module to achieve arbitrary code execution via direct kernel system calls, enabling full network exfiltration and container compromise. The library intercepts critical standard system functions such as execve, system, connect, and open. It also intercepts mprotect to prevent PROTEXEC (executable memory) allocations within the sandboxed Python processes, but pkeymprotect is not blocked. This issue has been fixed in version 2.8.0.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-39421?
CVE-2026-39421 is a critical severity vulnerability due to its potential for sandbox escape.
How do I fix CVE-2026-39421?
To fix CVE-2026-39421, upgrade MaxKB to version 2.8.0 or later.
What is the impact of CVE-2026-39421?
The impact of CVE-2026-39421 allows authenticated users to escape the sandbox and execute arbitrary system calls.
Which versions of MaxKB are affected by CVE-2026-39421?
MaxKB versions 2.7.1 and below are affected by CVE-2026-39421.
What component of MaxKB is vulnerable in CVE-2026-39421?
The ToolExecutor component of MaxKB is vulnerable in CVE-2026-39421.