Escape from AppleScript: Even folder names can be user input

OpenInTerminal is a popular macOS utility written in Swift that enhances the Finder by allowing users to quickly open the current directory in their preferred terminal application. It achieves this by integrating with the Finder's toolbar and context menu.When we investigated the code base, we noticed that developers often use AppleScript as a replacement for the missing eval() function in Swift. This practice of dynamically creating and executing scripts brings the risks usually associated with dynamic languages into a compiled language.This blog post will cover the technical details of an AppleScript Injection vulnerability discovered in OpenInTerminal, detected by SonarQube. We will walk
…