subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# Run the command try: output = subprocess.check_output( payload["command"], shell=True, stderr=subprocess.STDOUT,- Confidence
- 99% confidence
- Finding
- The server executes an HTTP-supplied command string with subprocess.check_output(..., shell=True), which enables arbitrary OS command execution by anyone who can reach the endpoint and supply the token. Because the token is hardcoded in the source and the service returns command output, this becomes a direct remote command execution primitive with full impact of the server's privileges.
