subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if use_shell: # Shell mode: pass command string directly to shell print(f"Starting server {i+1}/{len(servers)} (shell): {cmd}") process = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE,- Confidence
- 98% confidence
- Finding
- This code invokes subprocess.Popen with shell=True on a command string taken from the --server argument. If an attacker can influence that argument, shell metacharacters such as ;, &&, |, backticks, or command substitution can execute arbitrary OS commands, making this a classic command injection sink.
