subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 删除所有关联的 cron 任务 for job_id in reminders[reminder_name].get("job_ids", []): try: subprocess.run(f"openclaw cron delete {job_id}", shell=True, capture_output=True) except: pass- Confidence
- 98% confidence
- Finding
- This call interpolates job_id into a shell command string with shell=True. Because job_id is loaded from persisted reminder data and originally derived from external command output, a maliciously crafted or tampered value can trigger shell command injection and arbitrary command execution under the user's account.
