apple-photos
Audited by Socket on Sep 17, 2026
3 alerts found:
Anomalyx2SecurityThe code appears to be a legitimate local Photos search utility and contains no evident malware, exfiltration, persistence, or destructive behavior. It has a real security weakness because NAME and LIMIT are directly interpolated into SQL. A crafted local argument may cause malformed queries or SQL injection, potentially changing query behavior or exposing additional database information through output. Use parameterized queries or robust escaping and require LIMIT to match a strict nonnegative integer format.
The code appears to be a benign local Photos metadata utility, not malware. Its main security issue is SQL injection through direct interpolation of the user-supplied UUID; validate the UUID format and use sqlite3 parameter binding or safely escaped input. The script also intentionally exposes sensitive photo metadata, including geolocation, and has a minor pipeline exit-status flaw.
The code is intended as a Photos.app content search utility and contains no evident malware, exfiltration, or destructive behavior in its normal path. However, direct interpolation of QUERY and LIMIT into AppleScript creates an AppleScript injection vulnerability. Inputs should be safely escaped or passed through a non-interpolated mechanism, and LIMIT should be validated as a decimal integer. The vulnerability can permit unauthorized AppleScript actions under the invoking user's privileges.