subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if os.name == 'nt': ps_cmd = " ".join(cmd) full_ps_cmd = f"[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; {ps_cmd}" result = subprocess.run( ["powershell", "-Command", full_ps_cmd], capture_output=True, text=True,- Confidence
- 96% confidence
- Finding
- On Windows, the skill builds a PowerShell command string from user-controlled input and passes it to `powershell -Command`, which creates a command-injection path. Because the tool also enables `--permission-mode bypassPermissions`, a crafted message can cause arbitrary local command execution and filesystem changes without meaningful safeguards.
