Anyquery
Anyquery: AppleScript/JXA Code Injection via Unescaped URL in macOS plugins (Brave, Chrome, Edge, Reminders, Safari)
Anyquery is an SQL query engine built on top of SQLite. Prior to 0.4.5, authenticated users with INSERT or UPDATE access to affected macOS virtual tables can execute operating-system commands because the Chrome plugin and equivalent Brave, Edge, and Safari variants interpolate a SQL-controlled URL into AppleScript or JXA source passed to osascript. In plugins/chrome/tabs.go, tabsTable.Insert() passes the URL through fmt.Sprintf(newTabScript, url), and tabsTable.Update() uses fmt.Sprintf(setURLScript, pk, url). A URL containing quote and newline characters can break out of the intended string or property record and append script statements, resulting in arbitrary command execution with the privileges of the anyquery process on the macOS host. This issue is fixed in version 0.4.5.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 0.4.5
Fixed in 0.4.5
- < 0.2.0
Fixed in 0.2.0
- < 0.2.0
Fixed in 0.2.0
- < 0.2.0
Fixed in 0.2.0
- < 0.2.0
Fixed in 0.2.0
- < 0.2.0
Fixed in 0.2.0
Mitigation
Upgrade anyquery to 0.4.5 or later.
Upgrade github.com/julien040/anyquery/plugins/brave to 0.2.0 or later.
Upgrade github.com/julien040/anyquery/plugins/chrome to 0.2.0 or later.
Upgrade github.com/julien040/anyquery/plugins/edge to 0.2.0 or later.
Upgrade github.com/julien040/anyquery/plugins/reminders to 0.2.0 or later.
Upgrade github.com/julien040/anyquery/plugins/safari to 0.2.0 or later.
References
- Vendor advisory github.com/julien040/anyquery/security/advisor…
- Patch github.com/julien040/anyquery/commit/33769e03b…
- Release notes github.com/julien040/anyquery/releases/tag/0.4…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.