GHSA-MF78-3RPF-R784
Vulnerability from github – Published: 2026-07-14 20:19 – Updated: 2026-07-14 20:19Summary
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)
- Start the server on the victim machine:
bash anyquery server --host 0.0.0.0 --port 8070 - Connect from an attacker machine:
bash mysql -u root -h <VICTIM_IP> -P 8070 - Execute the following payload to read
/etc/passwd:sql 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.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 0.4.5"
},
"package": {
"ecosystem": "Go",
"name": "github.com/julien040/anyquery"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-54629"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-284",
"CWE-552",
"CWE-73",
"CWE-862"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-14T20:19:07Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\nAnyquery\u0027s `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.\n\n## Details\nAnyquery 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.\n\n## PoC (Proof of Concept)\n1. Start the server on the victim machine:\n ```bash\n anyquery server --host 0.0.0.0 --port 8070\n ```\n2. Connect from an attacker machine:\n ```bash\n mysql -u root -h \u003cVICTIM_IP\u003e -P 8070\n ```\n3. Execute the following payload to read `/etc/passwd`:\n ```sql\n CREATE VIRTUAL TABLE passwd USING csv_reader(\u0027/etc/passwd\u0027);\n SELECT * FROM passwd;\n ```\n\n## Impact\n- **Confidentiality:** High. Complete compromise of local file system confidentiality.\n- **Integrity:** None.\n- **Availability:** None.\n- **CVSS Score:** 7.5 (High) - `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`\n\n## Remediation\nImplement a sandboxing mechanism in Server Mode (e.g., a `--restrict-paths` flag) to limit `read_*` operations to designated directories.",
"id": "GHSA-mf78-3rpf-r784",
"modified": "2026-07-14T20:19:07Z",
"published": "2026-07-14T20:19:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/julien040/anyquery/security/advisories/GHSA-mf78-3rpf-r784"
},
{
"type": "PACKAGE",
"url": "https://github.com/julien040/anyquery"
},
{
"type": "WEB",
"url": "https://github.com/julien040/anyquery/releases/tag/0.4.5"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Anyquery: Local File Read (LFR) via Unrestricted SQLite Virtual Table Modules in Server Mode"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.