CVE-2026-50006
nicheUnauthenticated Arbitrary File Write via ATTACH DATABASE in Anyquery < 0.4.5
Anyquery, an open-source SQL query engine built on SQLite, fails to restrict the ATTACH DATABASE statement in its MySQL-compatible server component prior to version 0.4.5. A remote, unauthenticated attacker who can reach the server's MySQL protocol port can send SQL that attaches a database at any filesystem path writable by the Anyquery server process, causing SQLite to create a file there and fill it with attacker-controlled table content. This enables arbitrary file creation or overwrite, leading to filesystem integrity loss and denial of service; remote code execution is possible only in cases where another service on the host interprets the written file or the server process holds write access to a privileged target. Anyone running anyquery server in MySQL-compatible mode at a version before 0.4.5 is affected, especially if the port is reachable from untrusted networks. The flaw is fixed in version 0.4.5; no public proof of concept is known and the issue is not listed in the CISA Known Exploited Vulnerabilities catalog.
What to do: Upgrade anyquery server to version 0.4.5 or later immediately. If the MySQL-compatible port must be exposed, place it behind a firewall or VPN, require authentication where supported, and run the process as an unprivileged user with write access limited to a dedicated data directory. Review writable directories on affected hosts for unexpected SQLite database files or overwritten configuration files that could indicate prior abuse.
| anyquery (MySQL-compatible server mode) | all versions prior to 0.4.5 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Weakness
- CWE-22, CWE-73, CWE-284, CWE-434, CWE-862
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.