CVE-2026-39421 MaxKB: Sandbox escape via ctypes and unhooked SYS_pkey_mprotect

Medium 6.3 Published Updated

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.

Weakness: CWE-94, CWE-693

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.

Sources

Also known as GHSA-9c6w-j7w5-3gf7.

Is CVE-2026-39421 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free