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.
Published: 2026-09-14
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

Anyquery is an SQL query engine that forwards raw SQL from its MySQL‑compatible server port to SQLite. Until version 0.4.5, the engine did not constrain the ATTACH DATABASE command, allowing an unauthenticated attacker to specify any filesystem path writable by the server process. SQLite then creates or overwrites a database file at that location with attacker‑controlled table data. This leads to arbitrary file creation or overwrite, which can degrade filesystem integrity, cause denial of service, and, if a privileged writable location or another interpreter is involved, can lead to remote code execution. The flaw corresponds to several common weaknesses: improper file permissions, arbitrary write, and authentication bypass.

Affected Systems

The product affected is Anyquery, a server‑side SQL engine built on SQLite by the vendor julien040. All releases before 0.4.5 are vulnerable. The vulnerability is mitigated in any release 0.4.5 or later.

Risk and Exploitability

The CVSS score for this issue is 9.1, indicating a high‑severity attack path. While the EPSS score is not available, the flaw remains serious because it allows unauthenticated remote execution via the database server port. The flaw is not listed in the CISA KEV catalog, but the absence of an exploit probability metric does not diminish the potential impact. A remote attacker can exploit this through the MySQL‑compatible interface, which is typically exposed on TCP port 3306, and since no authentication is required, the attack vector to a target path that is writable by the Anyquery process; if that path is privileged or subsequently interpreted by another service, remote code execution can occur.

Generated by OpenCVE AI on September 15, 2026 at 11:47 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Anyquery to version 0.4.5 or later to eliminate the vulnerability.
  • Run the Anyquery service with the least privilege necessary and ensure that the process does not have write permissions to critical system directories.
  • If updating the software is not immediately possible, block or restrict external access to the MySQL‑compatible port, and consider configuring system file‑level ACLs to prevent the Anyquery process from writing to arbitrary locations as an interim defense.

Generated by OpenCVE AI on September 15, 2026 at 11:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-xrcf-6jh3-ggvx Anyquery: Arbitrary File Write (AFW) which could lead to Remote Code Execution (RCE) via Unrestricted ATTACH DATABASE in Server Mode
History

Mon, 14 Sep 2026 21:00:00 +0000

Type Values Removed Values Added
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.
Title Anyquery: Arbitrary File Write (AFW) which could lead to Remote Code Execution (RCE) via Unrestricted ATTACH DATABASE in Server Mode
Weaknesses CWE-22
CWE-284
CWE-434
CWE-73
CWE-862
References
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-14T19:56:39.502Z

Reserved: 2026-06-02T22:46:02.578Z

Link: CVE-2026-50006

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-14T20:16:44.637

Modified: 2026-09-14T20:16:44.637

Link: CVE-2026-50006

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-15T12:00:16Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-284

    Improper Access Control

  • CWE-434

    Unrestricted Upload of File with Dangerous Type

  • CWE-73

    External Control of File Name or Path

  • CWE-862

    Missing Authorization