subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def _run_osascript(script: str) -> str: completed = subprocess.run( ["osascript", "-e", script], stdout=subprocess.PIPE, stderr=subprocess.PIPE,- Confidence
- 90% confidence
- Finding
- This function executes dynamically constructed AppleScript via osascript, and upstream code interpolates untrusted values such as URLs and JavaScript snippets into that script. That creates an injection boundary where crafted content can break out of the intended string context and execute arbitrary AppleScript commands on macOS.
