CVE-2026-39420

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 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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:maxkb:maxkb:*:*:*:*:-:*:*:*

History

26 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) MaxKB es un asistente de IA de código abierto para empresas. En las versiones 2.7.1 e inferiores, un mecanismo incompleto de protección de sandbox permite a un usuario autenticado con privilegios de ejecución de herramientas escapar del sandbox basado en LD_PRELOAD. Mediante el comando env, el atacante puede borrar las variables de entorno y eliminar el hook sandbox.so, lo que lleva a una Ejecución Remota de Código (RCE) sin restricciones y acceso a la red. MaxKB restringe la ejecución de código Python no confiable a través de la API de depuración de herramientas inyectando sandbox.so mediante la variable de entorno LD_PRELOAD. Esto intercepta funciones sensibles de la biblioteca C (como execve, socket, open) para restringir el acceso a la red y a los archivos. Sin embargo, un parche permitió que la utilidad /usr/bin/env fuera ejecutada por el usuario en el sandbox. Cuando a un atacante se le permite crear subprocesos, puede ejecutar el comando env -i python. La bandera -i instruye a env para que borre completamente todas las variables de entorno antes de ejecutar el programa objetivo. Esto elimina eficazmente la variable de entorno LD_PRELOAD. El proceso Python recién generado se ejecutará, por lo tanto, de forma nativa sin ningún hook de sandbox, eludiendo todas las restricciones de red y del sistema de archivos. Este problema ha sido solucionado en la versión 2.8.0.

Information

Published : 2026-04-14 01:16

Updated : 2026-10-26 21:10


NVD link : CVE-2026-39420

Mitre link : CVE-2026-39420

CVE.ORG link : CVE-2026-39420


JSON object : View

Products Affected

maxkb

  • maxkb
CWE
CWE-78

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CWE-693

Protection Mechanism Failure