subprocess module call
- Category
- Dangerous Code Execution
- Confidence
- 99% confidence
- Finding
The subprocess call executes AppleScript assembled by callers that interpolate presentation text and paths. Many callers escape quotes but not backslashes, while functions such as set_font interpolate strings without escaping at all; attacker-controlled content can therefore become executable AppleScript and potentially run shell commands with the user's privileges.
- Content
python ) # 用 osascript 命令执行 proc = subprocess.run( ["osascript", "-e", script], capture_output=True, text=True,
