# CVE-2026-47252: Anyquery: AppleScript/JXA Code Injection via Unescaped URL in macOS plugins (Brave, Chrome, Edge, Reminders, Safari)

> Authenticated users can execute arbitrary OS commands on macOS by injecting code into AppleScript via unescaped URLs in browser plugins.

- **Severity:** Critical 9.0 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 17 Sep 2026
- **Updated:** 17 Sep 2026
- **Also known as:** GHSA-hrj8-hjv8-mgwc, GO-2026-5436

## What is CVE-2026-47252?

CVE-2026-47252 is a critical code injection vulnerability in anyquery, published on 17 Sep 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2026-47252?

12 open source packages ship an affected version, including github.com/julien040/anyquery/plugins/brave, github.com/julien040/anyquery/plugins/chrome and github.com/julien040/anyquery/plugins/edge.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/julien040/anyquery/plugins/brave` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/brave` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/brave` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/chrome` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/chrome` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/chrome` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/edge` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/edge` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/edge` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/safari` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/safari` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |
| `github.com/julien040/anyquery/plugins/safari` | Go | All versions | 0.0.0-20240826075852-c651df0b8767 |

## How do I fix CVE-2026-47252?

Upgrade github.com/julien040/anyquery/plugins/brave to 0.0.0-20240826075852-c651df0b8767 or later.

## Is CVE-2026-47252 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-47252 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-47252 and fix it if it is affected.

What it is: CVE-2026-47252 is a critical code injection vulnerability in anyquery, published on 17 Sep 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-47252 exists.

Affected packages and fixed versions:
- github.com/julien040/anyquery/plugins/brave (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/brave (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/brave (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/chrome (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/chrome (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/chrome (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/edge (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/edge (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/edge (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/safari (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/safari (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767
- github.com/julien040/anyquery/plugins/safari (Go): affected all versions; fixed in 0.0.0-20240826075852-c651df0b8767

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-47252/ (Markdown: https://insights.sbomify.com/CVE-2026-47252/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-47252
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-47252
- OSV: https://osv.dev/vulnerability/CVE-2026-47252

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-47252/
Summaries are generated and may contain mistakes; the official description above is the record.
