subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
env = os.environ.copy() env['PORT'] = str(port) process = subprocess.Popen( command, shell=True, stdout=subprocess.PIPE,- Confidence
- 95% confidence
- Finding
- The script passes a user-controlled string from --server/config directly to subprocess.Popen with shell=True, which allows shell metacharacters and command chaining. In a skill/agent context, this can lead to arbitrary command execution on the host if untrusted input reaches that parameter.
