subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if platform.system() == 'Windows': os.startfile(url) elif platform.system() == 'Darwin': # macOS subprocess.Popen(['open', url]) else: # Linux subprocess.Popen(['xdg-open', url])- Confidence
- 88% confidence
- Finding
- The code launches a URL using the local OS handler via subprocess without validating the scheme, domain, or provenance of the URL. Although it avoids shell injection by using an argument list, it still permits remote content to trigger local browser/application launches, which can expose users to phishing pages or unsafe protocol handlers.
