subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
$img.Dispose() Write-Output "CLIPBOARD_OK" ''' result = subprocess.run(["powershell", "-Command", ps_cmd], capture_output=True, text=True) if result.returncode == 0: print(f"[clipboard] Image copied: {args.image}") else:- Confidence
- 97% confidence
- Finding
- This PowerShell command embeds the user-controlled image path directly into a script string without escaping PowerShell metacharacters. An attacker who can supply a crafted --image value could break out of the quoted string and inject arbitrary PowerShell commands, leading to code execution under the current user context.
