subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
elif system == "Linux": subprocess.Popen(["xdg-open", url], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) elif system == "Windows": subprocess.Popen(["start", url], shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) else: return False return True- Confidence
- 98% confidence
- Finding
- The Windows branch uses subprocess.Popen with shell=True, which routes execution through the shell and can turn crafted input into command execution. Although the URL is intended to be generated internally, it incorporates a remotely supplied sessionId from the backend, so a compromised or unexpected response could inject shell metacharacters and execute arbitrary commands on the host.
