← volver
CVE-2026-39888

PraisonAIAgents has a sandbox escape via exception frame traversal in `execute_code` (subprocess mode)

CVSS 10 CRITICALEPSS 0.5%CWE-657CWE-693
En resumen

La caja de arena de código de PraisonAI puede ser escapada explotando frames de excepción para acceder a funciones Python ocultas. Un atacante puede ejecutar código sin restricciones a pesar de los bloqueos de seguridad.

Detalle técnico

La función execute_code() utiliza bloqueo incompleto de atributos (11 versus 30+ nombres) en modo sandbox subprocess, omitiendo __traceback__, tb_frame, f_back y f_builtins. Un atacante puede encadenar estos atributos de frame de excepción para acceder al diccionario __builtins__ real del wrapper y recuperar exec() bajo un nombre no bloqueado, eludiendo completamente las restricciones de sandbox. Sin autenticación requerida; la vulnerabilidad requiere solo capacidad de proporcionar entrada a execute_code().

Resumen generado y traducido por IA a partir de la descripción oficial.
PraisonAI is a multi-agent teams system. Prior to 1.5.115, execute_code() in praisonaiagents.tools.python_tools defaults to sandbox_mode="sandbox", which runs user code in a subprocess wrapped with a restricted __builtins__ dict and an AST-based blocklist. The AST blocklist embedded inside the subprocess wrapper (blocked_attrs of python_tools.py) contains only 11 attribute names — a strict subset of the 30+ names blocked in the direct-execution path. The four attributes that form a frame-traversal chain out of the sandbox are all absent from the subprocess list (__traceback__, tb_frame, f_back, and f_builtins). Chaining these attributes through a caught exception exposes the real Python builtins dict of the subprocess wrapper frame, from which exec can be retrieved and called under a non-blocked variable name — bypassing every remaining security layer. This vulnerability is fixed in 1.5.115.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

¿Quieres saber si tu infraestructura está expuesta a esto?

Hablar con TrueHacking →