# CVE-2026-50006: Anyquery arbitrary file write via ATTACH DATABASE in server mode

Source: https://junglewise.ai/threats/cve-2026-50006-anyquery-arbitrary-file-write-via-attach-database-in-server-mode  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-14. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

CVE-2026-50006 · Severity: critical · CVSS 9.1 · Published 2026-09-14

Anyquery is a tool that allows users to run SQL queries on various data sources. When running in server mode, it fails to restrict certain database commands, allowing an unauthenticated attacker to write files anywhere on the system where the application has permission. This can lead to a complete system takeover if an attacker overwrites critical system files or web server scripts.

Technologies: [github.com/julien040/anyquery (Go)](https://junglewise.ai/threats/technologies/github-com-julien040-anyquery), [Julien040 Anyquery](https://junglewise.ai/threats/technologies/anyquery). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Julien040](https://junglewise.ai/threats/vendors/julien040).

## Quick answers

**Is CVE-2026-50006 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-50006 being exploited in the wild.

**How severe is CVE-2026-50006?** Critical severity, with a CVSS score of 9.1, published 14 September 2026.

**Which products and versions are affected?** github.com/julien040/anyquery (Go) < 0.4.5, SEMVER:introduced=0; Julien040 Anyquery < 0.4.5.

**Is there a fix for CVE-2026-50006?** A patch was published on 2026-07-14: Fixed in version 0.4.5 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-50006 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-50006?** Check whether you run github.com/julien040/anyquery (Go) or Julien040 Anyquery at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

Anyquery in 'server' mode (MySQL-compatible) blindly proxies SQL commands to an underlying SQLite engine without restricting administrative commands. An unauthenticated remote attacker can use the 'ATTACH DATABASE' command to create or overwrite files at arbitrary paths on the host filesystem. By injecting malicious payloads into these files (such as cron jobs or PHP shells), an attacker can achieve Remote Code Execution (RCE). The vulnerability is rooted in missing authorization and unrestricted access to dangerous SQLite functions. Users should update to version 0.4.5 or later where these functions are restricted in server mode.

## Affected products

- julien040 anyquery < 0.4.5

## Identifiers

- CVE-2026-50006
- GHSA-xrcf-6jh3-ggvx
- GO-2026-5979

## Timeline

- 2026-06-09: disclosed: Vulnerability reported to vendor
- 2026-07-14: advisory: GitHub Advisory published
- 2026-07-14: patched: Fixed in version 0.4.5

## References

- [https://api.github.com/users/Metincloup](https://api.github.com/users/Metincloup)
- [https://github.com/Metincloup](https://github.com/Metincloup)
- [https://api.github.com/users/Metincloup/gists%7B/gist_id%7D](https://api.github.com/users/Metincloup/gists%7B/gist_id%7D)
- [https://api.github.com/users/Metincloup/repos](https://api.github.com/users/Metincloup/repos)
- [https://avatars.githubusercontent.com/u/88655361?v=4](https://avatars.githubusercontent.com/u/88655361?v=4)
- [https://api.github.com/users/Metincloup/events%7B/privacy%7D](https://api.github.com/users/Metincloup/events%7B/privacy%7D)

## Related threats

- [Anyquery local file read via unrestricted SQLite virtual tables](https://junglewise.ai/threats/cve-2026-54629-anyquery-local-file-read-via-unrestricted-sqlite-virtual-tables)
- [Anyquery SSRF via Unrestricted SQLite Virtual Table Modules in Server Mode](https://junglewise.ai/threats/cve-2026-54628-anyquery-ssrf-via-unrestricted-sqlite-virtual-table-modules-in)
- [julien040 Anyquery path traversal in clear_plugin_cache](https://junglewise.ai/threats/cve-2026-47253-julien040-anyquery-path-traversal-in-clear-plugin-cache)
