/

CVE-2026-51870

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in DeepTutor ExecTool

CVE-2026-51870

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

DeepTutor v1.4.0 contains a critical operating system command injection vulnerability in the ExecTool.execute function. If attacker-controlled data reaches this tool and is interpreted as a shell command, an attacker may execute arbitrary commands with the privileges of the DeepTutor process.

Affected context

The vulnerability occurs in DeepTutor v1.4.0's /tutorbot/agent/tools/shell.py execution component. Risk is present when untrusted user input, agent-generated content, or externally influenced task data can flow into ExecTool.execute without strong separation between data and operating-system commands.

Exploit preconditions

  • Attack surface: The DeepTutor agent's shell execution tool
  • Required access: The ability to influence input processed by the agent or invoke a workflow that uses ExecTool.execute
  • Trigger point: Execution of attacker-influenced content by the shell tool
  • Why exploitation is possible: Input is able to affect command interpretation rather than being treated strictly as inert data

Why this happens

The underlying bug is an OS command injection weakness, mapped to CWE-78. The vulnerable pattern occurs when application-controlled or user-influenced data is incorporated into a shell command without reliable separation, strict validation, or an execution interface that avoids shell interpretation. This can allow command syntax in the data to alter the operation performed by the host operating system.

Potential impact

  • An attacker may execute arbitrary commands in the DeepTutor runtime
  • The application process may be used to access sensitive files or environment data
  • Application integrity could be compromised through modification or deletion of local resources
  • The host or surrounding services could be affected, depending on process privileges and isolation
  • Credentials or tokens available to the process could be exposed

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from normal application workflows and reducing trust in agent-generated or user-supplied input.

Common defensive patterns include:

  • Prefer direct process-execution APIs that pass a fixed executable and argument list without invoking a shell
  • Use strict allowlists for permitted operations, commands, and argument formats
  • Keep user and agent content separate from executable command construction
  • Apply least-privilege service accounts, filesystem permissions, and runtime capabilities
  • Isolate command-running workers and restrict their network and filesystem access
  • Treat environment variables, tool outputs, and retrieved content as untrusted input

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules for shell invocation APIs, string-built commands, and dynamic execution paths
  • Code review checks for concatenation or interpolation of external data into command strings
  • Instrumentation and policy enforcement that records tool invocations and blocks commands outside an allowlist
  • Runtime monitoring for unexpected child processes, command interpreters, file changes, or outbound connections
  • Automated security review tools that identify data flows from agent or user input into process execution

Sources

SourceLink
gist.github.comgist.github.com/Ro1ME/58b7e7523f517bc1241183ff988b6707
github.comgithub.com/HKUDS/DeepTutor/issues/506

Frequently asked

questions

Exploitability depends on how DeepTutor exposes the affected agent and whether untrusted users or external content can influence calls to ExecTool.execute. A network-reachable workflow may make exploitation possible without local host access.

The attacker generally needs a way to submit or influence data that reaches the shell execution tool. The exact requirement depends on authentication, agent permissions, exposed interfaces, and deployment isolation.

Avoid shell interpretation for routine operations. Use fixed executable paths with structured arguments, enforce narrowly scoped allowlists, and reject inputs that do not conform to the expected format.

Treat agent output and user input as untrusted, review every tool boundary, apply least privilege and isolation, and continuously monitor process execution for unexpected behavior.

Find out what's already
exploitable in your codebase.