os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
try: title = "Backtest Poller" message = f"Backtest {bt.name} finished ({bt.status})" os.system( f"""osascript -e 'display notification "{message}" with title "{title}"'""" ) logger.info(f"Notification sent: {message}")- Confidence
- 98% confidence
- Finding
- The notification command builds a shell string with untrusted data from bt.name and bt.status, then executes it via os.system(). If an attacker can influence the backtest name or related state, they may inject quotes or shell metacharacters and achieve arbitrary local command execution under the poller user's account. In this daemon context, that is especially dangerous because it runs unattended and persists in the background.
