subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
end tell ''' result = subprocess.run( ['osascript', '-e', script], capture_output=True, text=True- Confidence
- 96% confidence
- Finding
- The subprocess invocation itself is not using a shell, which avoids classic shell injection, but it executes an AppleScript program built from untrusted `recipient` and `image_path`-derived data. Because `send_path` and `formatted_recipient` are interpolated directly into quoted AppleScript source, crafted values containing quotes or AppleScript syntax can break out of the intended string literal and alter the script executed by `osascript`.
