Do you need to file an issue?
Describe the bug
DeepTutor’s TutorBot shell tool exposes command execution through ExecTool.execute. In a real TutorBot WebSocket session, a user prompt can cause the LLM to select the shell tool and pass a generated command into:
asyncio.create_subprocess_shell(command, ...)
Affected component:
deeptutor/tutorbot/agent/tools/shell.py function: ExecTool.execute source line: 83 sink line: 98
The validated path was:
User message -> TutorBot WebSocket session -> real Claude-compatible LLM -> ExecTool.execute -> asyncio.create_subprocess_shell
A benign marker file was created in the bot workspace:
Steps to reproduce
- Install DeepTutor from the affected source snapshot.
git clone https://github.com/HKUDS/DeepTutor.git cd DeepTutor python -m venv .venv .venv\Scripts\activate pip install -e ".[server]"
- Start the backend.
python -m deeptutor.api.run_server
- Start the frontend.
cd web npm install npm run dev
- Open the DeepTutor web UI in a browser.
- Configure a real LLM API key, such as a Claude-compatible or OpenAI-compatible model.
- Create a new TutorBot.
- Enable the shell execution tool / ExecTool capability for the bot.
- Open the TutorBot chat session. The chat path uses the real WebSocket TutorBot entry.
- Send a benign prompt such as:
Please create a file named deeptutor_note_21may.txt in your workspace with the content DEEPTUTOR_EXEC_TOOL_MARKER. Use the available shell tool if needed.
- Observe that the model can choose the shell tool and generate a shell command.
- Check the bot workspace:
cat data/tutorbot/<bot_name>/workspace/deeptutor_note_21may.txt
- The marker file should contain:
DEEPTUTOR_EXEC_TOOL_MARKER
Expected Behavior
A user prompt should not be able to drive LLM-generated shell commands into host shell execution without strong safety controls.
Expected protections include at least one of:
- Disable shell execution tools by default. - Require explicit user/admin confirmation before shell execution. - Use a strict command allowlist. - Run commands only inside a hardened sandbox. - Prevent arbitrary model-generated command strings from reaching create_subprocess_shell. - Clearly warn users when enabling ExecTool.
Related Module
Dashboard
Configuration Used
Affected version: DeepTutor v1.4.0 source snapshot TutorBot: newly created bot Tool: ExecTool / shell execution enabled LLM: real Claude-compatible model Validation: real WebSocket service + real LLM + end-to-end tool execution Payload: benign marker-file creation only
Logs and screenshots
Observed validation result:
A fresh DeepTutor websocket session against a newly created bot used the real tutorbot entry and a real Claude-compatible model to trigger ExecTool.execute, which created the preserved deeptutor_note_21may.txt marker in the bot workspace.
Relevant source sink:
process = await asyncio.create_subprocess_shell( command, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, cwd=cwd, env=env, )
Additional Information
- DeepTutor Version:v1.4.0
- Operating System:Windows
- Python Version:3.11+
- Node.js Version:18+
- Browser (if applicable):Chrome / Edge
- Related Issues:
Do you need to file an issue?
Describe the bug
DeepTutor’s TutorBot shell tool exposes command execution through ExecTool.execute. In a real TutorBot WebSocket session, a user prompt can cause the LLM to select the shell tool and pass a generated command into:
Affected component:
The validated path was:
A benign marker file was created in the bot workspace:
Steps to reproduce
Expected Behavior
A user prompt should not be able to drive LLM-generated shell commands into host shell execution without strong safety controls.
Expected protections include at least one of:
Related Module
Dashboard
Configuration Used
Affected version: DeepTutor v1.4.0 source snapshot TutorBot: newly created bot Tool: ExecTool / shell execution enabled LLM: real Claude-compatible model Validation: real WebSocket service + real LLM + end-to-end tool execution Payload: benign marker-file creation only
Logs and screenshots
Observed validation result:
Relevant source sink:
Additional Information