Summary
CVE-2026-51870 is a critical OS command injection vulnerability in DeepTutor v1.4.0, an open-source AI tutoring/agent platform. The flaw resides in the ExecTool.execute function of deeptutor/tutorbot/agent/tools/shell.py, where LLM-generated shell commands are passed directly to a subprocess call without validation, sanitization, or user confirmation. The issue is rated CVSS 9.8 (Critical) and allows an unauthenticated, remote attacker to achieve arbitrary command execution on the host.
Technical details
- Root cause: TutorBot’s
ExecTool.executefunction (lines 83–98 ofshell.py) passes attacker/LLM-generated command strings directly toasyncio.create_subprocess_shell()with no allowlisting, sanitization, or sandboxing. - Trigger conditions: A client connects to the TutorBot WebSocket chat endpoint (
/api/v1/tutorbot/<bot_name>/ws) and sends a message/prompt that causes the backing LLM to invoke the shell execution tool; the tool was enabled by default with no confirmation step. - Attack vector: Network — no authentication or prior access is required, and no user interaction beyond the attacker’s own crafted prompt is needed.
- Impact: Full compromise of confidentiality, integrity, and availability via arbitrary OS command execution in the context of the DeepTutor service.
Affected software
- DeepTutor v1.4.0 (and earlier versions containing the unguarded
ExecToolshell execution path)
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade to DeepTutor v1.4.1 or later, where shell execution is disabled by default (the shell tool is only registered when an administrator explicitly sets
allow_shell_exec), filesystem/shell access is confined to the bot workspace, and command deny-listing has been hardened. - If immediate patching is not possible: Disable or remove the TutorBot shell execution tool, restrict network exposure of the TutorBot WebSocket endpoint to trusted/internal networks, and avoid enabling
allow_shell_execunless strictly required with additional sandboxing/isolation in place.

