CVE-2026-39420
Full vulnerability record from the local CVENow database.
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 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.
View original CVE JSON
{
"id": "CVE-2026-39420",
"sourceIdentifier": "[email protected]",
"published": "2026-04-14T01:16:04.530",
"lastModified": "2026-10-26T21:10:00.170",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "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."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "1Panel-dev",
"product": "MaxKB",
"versions": [
{
"version": "< 2.8.0",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"baseScore": 6.3,
"baseSeverity": "MEDIUM",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "LOW",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"availabilityImpact": "LOW"
},
"exploitabilityScore": 2.8,
"impactScore": 3.4
},
{
"source": "[email protected]",
"type": "Primary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L",
"baseScore": 7.4,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "LOW",
"userInteraction": "NONE",
"scope": "CHANGED",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"availabilityImpact": "LOW"
},
"exploitabilityScore": 3.1,
"impactScore": 3.7
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-04-16T13:22:39.898484Z",
"id": "CVE-2026-39420",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-78"
},
{
"lang": "en",
"value": "CWE-693"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:maxkb:maxkb:*:*:*:*:-:*:*:*",
"versionEndExcluding": "2.8.0",
"matchCriteriaId": "8BB376B6-4E9C-4801-9D33-5BF858C857D2"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/1Panel-dev/MaxKB/commit/2d17b08e6b060329803754a05e806d0ddecf3fa8",
"source": "[email protected]",
"tags": [
"Patch"
]
},
{
"url": "https://github.com/1Panel-dev/MaxKB/releases/tag/v2.8.0",
"source": "[email protected]",
"tags": [
"Release Notes"
]
},
{
"url": "https://github.com/1Panel-dev/MaxKB/security/advisories/GHSA-7wgv-v2r3-7f7w",
"source": "[email protected]",
"tags": [
"Vendor Advisory"
]
}
]
}