os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
# Open on macOS if sys.platform == "darwin": os.system(f'open "{filepath}"') except Exception as e: print(f"Download failed: {e}", file=sys.stderr)- Confidence
- 94% confidence
- Finding
- The tool invokes os.system with a shell command constructed from a file path derived from user-controlled download_dir. Even though the path is wrapped in double quotes, shell metacharacters such as embedded quotes can break out of quoting and lead to command injection on macOS when a crafted path is used.
