subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# Note: PowerShell printing is limited, may not work for all file types """ result = subprocess.run( ['powershell', '-Command', ps_script], capture_output=True, text=True,- Confidence
- 98% confidence
- Finding
- This PowerShell subprocess executes a dynamically constructed script that embeds the user-supplied printer name directly into the command text. An attacker who can control the printer argument could inject PowerShell syntax and execute arbitrary commands in the context of the script.
