subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
end tell return false ''' result = subprocess.run(["osascript", "-e", script], capture_output=True, text=True) if result.returncode != 0: print(f"QuickTime setup failed: {result.stderr}") return False- Confidence
- 96% confidence
- Finding
- This AppleScript is built with direct string interpolation of the Apple TV name (`atv_name`) into the script source, then executed via `osascript`. If a device name contains quotes or AppleScript syntax, a local network attacker controlling a spoofed Apple TV advertisement or a maliciously renamed device could inject arbitrary AppleScript commands on the Mac, leading to local code execution or UI automation abuse.
