CVE-2026-39420
Published: 14 April 2026
Summary
CVE-2026-39420 is a medium-severity OS Command Injection (CWE-78) vulnerability in Maxkb Maxkb. Its CVSS base score is 6.3 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 31.4th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
This vulnerability is AI-related — categorised as Other AI Platforms.
The strongest mitigations our analysis identified are NIST 800-53 SC-39 (Process Isolation) and SI-2 (Flaw Remediation).
Threat & Defense at a Glance
Threat & Defense Details
Mitigating Controls (NIST 800-53 r5)AI
Timely flaw remediation directly addresses the sandbox escape by applying the patch fixed in MaxKB version 2.8.0.
Process isolation enforces robust boundaries for untrusted Python code execution, preventing escapes via utilities like env that clear LD_PRELOAD.
Least privilege restricts tool execution privileges needed for subprocess creation, limiting authenticated users able to invoke the vulnerable env command.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
The vulnerability is a sandbox escape in a web-accessible AI application (MaxKB Tool Debug API) that directly enables remote code execution via unsandboxed Python invocation (env -i python), mapping to exploitation of a public-facing application for initial access and Python for command/script execution.
NVD Description
MaxKB is an open-source AI assistant for enterprise. In versions 2.7.1 and below, an incomplete sandbox protection mechanism allows an authenticated user with tool execution privileges to escape the LD_PRELOAD-based sandbox. By env command the attacker can clear the environment…
more
variables and drop the sandbox.so hook, leading to unrestricted Remote Code Execution (RCE) and network access. MaxKB restricts untrusted Python code execution via the Tool Debug API by injecting sandbox.so through the LD_PRELOAD environment variable. This intercepts sensitive C library functions (like execve, socket, open) to restrict network and file access. However, a patch allowed the /usr/bin/env utility to be executed by the sandboxed user. When an attacker is permitted to create subprocesses, they can execute the env -i python command. The -i flag instructs env to completely clear all environment variables before running the target program. This effectively drops the LD_PRELOAD environment variable. The newly spawned Python process will therefore execute natively without any sandbox hooks, bypassing all network and file system restrictions. This issue has been fixed in version 2.8.0.
Deeper analysisAI
CVE-2026-39420 is a sandbox escape vulnerability in MaxKB, an open-source AI assistant for enterprise knowledge bases, affecting versions 2.7.1 and below. MaxKB employs an LD_PRELOAD-based sandbox via injection of sandbox.so to restrict untrusted Python code execution through the Tool Debug API. This shared object intercepts sensitive C library functions such as execve, socket, and open to limit network and file system access. However, the implementation incompletely protects against the /usr/bin/env utility, which sandboxed processes can execute, as rated at CVSS 3.1 score of 6.3 (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L) and mapped to CWEs-78 and CWE-693.
An authenticated user with tool execution privileges, which allows subprocess creation, can exploit this remotely with low complexity. By invoking the command "env -i python", the -i flag clears all environment variables, including LD_PRELOAD, before launching the Python interpreter. This spawns a native Python process free of sandbox hooks, enabling unrestricted remote code execution (RCE), arbitrary file access, and network connectivity, bypassing all intended restrictions.
The vulnerability was addressed in MaxKB version 2.8.0. Mitigation details are available in the GitHub security advisory (GHSA-7wgv-v2r3-7f7w), release notes for v2.8.0, and the fixing commit (2d17b08e6b060329803754a05e806d0ddecf3fa8), which security practitioners should review for patch deployment and verification instructions.
Details
- CWE(s)
Affected Products
AI Security AnalysisAI
- AI Category
- Other AI Platforms
- Risk Domain
- N/A
- OWASP Top 10 for LLMs 2025
- None mapped
- Classification Reason
- Matched keywords: ai