subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
Write-Output $foundTitle }} ''' result = subprocess.run( ['powershell', '-Command', ps_script], capture_output=True, text=True,- Confidence
- 91% confidence
- Finding
- This PowerShell invocation embeds untrusted input (`title_pattern`) directly into a script string passed to `powershell -Command`. An attacker who can influence the window-title argument could break out of the quoted string and inject arbitrary PowerShell, turning a window lookup into code execution.
