CVE-2026-39421 MaxKB: Sandbox escape via ctypes and unhooked SYS_pkey_mprotect
Authenticated attackers can escape the sandbox via unhooked system calls to achieve arbitrary code execution and compromise the container.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-39421?
CVE-2026-39421 is a medium-severity code injection vulnerability in 1Panel-dev MaxKB, published on 14 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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 LD_PRELOAD-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 PROT_EXEC (executable memory) allocations within the sandboxed Python processes, but pkey_mprotect is not blocked. This issue has been fixed in version 2.8.0.
Which versions are affected by CVE-2026-39421?
It affects 1 product.
Products include Maxkb Maxkb.
How do I fix CVE-2026-39421?
No fix has been published for CVE-2026-39421 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-39421 being exploited?
There is no known exploitation of CVE-2026-39421 in the wild and no public exploit code.
Other vulnerabilities in 1Panel-dev MaxKB
- CVE-2025-66419 MaxKB vulnerable to privilege escalation through sandbox bypass
- CVE-2025-66446 MaxKB has a Python sandbox LD_PRELOAD bypass
- CVE-2025-64511 MaxKB has SSRF in sandbox
- CVE-2026-39422 MaxKB has Stored XSS via ChatHeadersMiddleware
- CVE-2026-39423 Stored XSS via Eval Injection in EchartsRander Component
Sources
Also known as GHSA-9c6w-j7w5-3gf7.