Skip to content

Anyquery: Local File Read (LFR) via Unrestricted SQLite Virtual Table Modules in Server Mode

High severity GitHub Reviewed Published Jun 9, 2026 in julien040/anyquery • Updated Jul 14, 2026

Package

gomod github.com/julien040/anyquery (Go)

Affected versions

< 0.4.5

Patched versions

None

Description

Summary

Anyquery's server mode lacks input sanitization and access control over its built-in SQLite virtual table modules (e.g., csv_reader, log_reader). Unauthenticated attackers connecting to the MySQL-compatible server port can create virtual tables pointing to local files on the system (e.g., /etc/passwd, ~/.ssh/id_rsa). This allows full Local File Read (LFR) capabilities, compromising sensitive system configurations and credentials.

Details

Anyquery utilizes the hashicorp/go-getter library within its data ingestion modules. When Anyquery is launched in Server Mode (anyquery server), it binds to a TCP port and accepts MySQL protocol connections. The server handler does not restrict the usage of these virtual table modules to safe directories. An attacker can connect to the server and execute native SQLite virtual table creation queries to instantiate modules like csv_reader pointing to restricted files. Because the file read operation is initiated by the Anyquery server process, the attacker can read any file the process has access to.

PoC (Proof of Concept)

  1. Start the server on the victim machine:
    anyquery server --host 0.0.0.0 --port 8070
  2. Connect from an attacker machine:
    mysql -u root -h <VICTIM_IP> -P 8070
  3. Execute the following payload to read /etc/passwd:
    CREATE VIRTUAL TABLE passwd USING csv_reader('/etc/passwd');
    SELECT * FROM passwd;

Impact

  • Confidentiality: High. Complete compromise of local file system confidentiality.
  • Integrity: None.
  • Availability: None.
  • CVSS Score: 7.5 (High) - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Remediation

Implement a sandboxing mechanism in Server Mode (e.g., a --restrict-paths flag) to limit read_* operations to designated directories.

References

@julien040 julien040 published to julien040/anyquery Jun 9, 2026
Published to the GitHub Advisory Database Jul 14, 2026
Reviewed Jul 14, 2026
Last updated Jul 14, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

EPSS score

Weaknesses

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

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

External Control of File Name or Path

The product allows user input to control or influence paths or file names that are used in filesystem operations. Learn more on MITRE.

Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. Learn more on MITRE.

Files or Directories Accessible to External Parties

The product makes files or directories accessible to unauthorized actors, even though they should not be. Learn more on MITRE.

Missing Authorization

The product does not perform an authorization check when an actor attempts to access a resource or perform an action. Learn more on MITRE.

CVE ID

CVE-2026-54629

GHSA ID

GHSA-mf78-3rpf-r784

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.