Anyquery: AppleScript/JXA Code Injection via Unescaped URL in macOS plugins (Brave, Chrome, Edge, Reminders, Safari)
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 0.4.5, 0.2.0, 0.0.0-20240826075852-c651df0b8767
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: poc
- Automatable: no
- Technical impact: total
Summary
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.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: poc · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- julien040 anyquery
fixed in 0.4.5
- anyquery github.com/julien040/anyquery/plugins/brave
fixed in 0.2.0
- anyquery github.com/julien040/anyquery/plugins/chrome
fixed in 0.2.0
- anyquery github.com/julien040/anyquery/plugins/edge
fixed in 0.2.0
- anyquery github.com/julien040/anyquery/plugins/reminders
fixed in 0.2.0
- anyquery github.com/julien040/anyquery/plugins/safari
fixed in 0.2.0
- github.com/julien040/anyquery/plugins/braveGo
fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/chromeGo
fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/edgeGo
fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/safariGo
fixed in 0.0.0-20240826075852-c651df0b8767