subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
command = ["osascript"] for line in script_lines: command.extend(["-e", line]) return subprocess.run( command, capture_output=True, text=False,- Confidence
- 94% confidence
- Finding
- This invokes AppleScript via `osascript` and constructs script lines with direct interpolation of `pptx_path` and `pdf_path`. Because AppleScript string literals are delimited by double quotes, a crafted filename containing quotes or AppleScript syntax could break out of the intended literal and inject arbitrary AppleScript commands, leading to execution of attacker-controlled actions on macOS.
