/

CVE-2026-54628

Severity:

HIGH RISK

(8.6)

Server-Side Request Forgery (CWE-918) in Anyquery Server

CVE-2026-54628

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-284, CWE-441, CWE-862, CWE-918

Impact:

Internal service access, sensitive data disclosure, and potentially unauthorized state-changing requests

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Anyquery versions before 0.4.5 expose URL-capable SQLite virtual table modules through an unauthenticated MySQL-compatible server port without sufficiently restricting outbound destinations. A remote attacker may cause the server to request loopback, private-network, link-local, or cloud metadata URLs and expose returned data through query results.

Affected context

The issue occurs in Anyquery server deployments where the unauthenticated MySQL-compatible interface permits queries using URL-capable modules such as json_reader or log_reader. Risk increases when the server can make outbound requests to internal networks, local services, or cloud metadata endpoints and return fetched responses as queryable table data.

Exploit preconditions

  • Attack surface: Anyquery's unauthenticated MySQL-compatible server port
  • Required access: Network reachability to the exposed server port; application authentication is not required
  • Trigger point: A query that causes a URL-capable virtual table module to fetch a remote resource
  • Required environmental condition: The Anyquery process must have network access to the targeted internal, loopback, link-local, or metadata endpoint
  • Why exploitation is possible: Outbound destinations are not sufficiently restricted, and fetched responses can be surfaced through query results

Why this happens

The underlying defect is insufficient server-side validation and authorization of outbound requests initiated through database virtual table modules. User-controlled or remotely supplied URLs are passed to a fetching mechanism without enforcing an appropriate destination policy, allowing the server to act as a proxy toward protected network locations.

This maps primarily to CWE-918: Server-Side Request Forgery, with related aspects of CWE-284: Improper Access Control, CWE-441: Unintended Proxy or Intermediary ('Confused Deputy'), and CWE-862: Missing Authorization.

Potential impact

  • Internal services or APIs may be probed from the server's network position
  • Cloud instance metadata or temporary credentials could be disclosed
  • Responses from private or loopback services may be exposed as queryable data
  • Internal APIs may receive unauthorized requests
  • State-changing operations could cause low-integrity impact where reachable services permit them
  • Sensitive network topology and service information could be revealed

General mitigation guidance

Mitigation generally focuses on reducing trust in URL inputs and enforcing a restrictive outbound network policy.

Common defensive patterns include:

  • Restricting URL-capable modules to approved schemes, hosts, ports, and destinations
  • Blocking loopback, private-network, link-local, broadcast, and cloud metadata address ranges
  • Revalidating destinations after DNS resolution and across redirects
  • Disabling unnecessary URL-fetching modules or requiring explicit administrative enablement
  • Requiring authentication and authorization before permitting query execution
  • Applying egress firewall controls and network segmentation around the Anyquery process
  • Running the service with only the minimum network and filesystem privileges required
  • Avoiding exposure of administrative or database-compatible ports to untrusted networks

How teams detect issues like this

Organizations can detect related risks through:

  • Static analysis and code review for user-controlled URLs passed to HTTP or file-fetching libraries
  • Review of database extensions and virtual table modules that perform network access
  • Tests covering loopback, private, link-local, metadata, redirect, and DNS-rebinding destinations
  • Monitoring outbound requests from Anyquery processes to internal address ranges or cloud metadata services
  • Network policy alerts for unexpected egress from query-engine workloads
  • Access-log correlation between unauthenticated database queries and subsequent internal HTTP requests
  • Policy enforcement that requires authentication, destination allowlists, and restricted egress for network-enabled extensions

Sources

SourceLink
github.comgithub.com/julien040/anyquery/commit/27f84fc168310455eaf81ec4ba87eed20298670c
github.comgithub.com/julien040/anyquery/releases/tag/0.4.5
github.comgithub.com/julien040/anyquery/security/advisories/GHSA-hwrq-8wxh-q4xv

Frequently asked

questions

Yes. A remote attacker may exploit the issue when they can reach the unauthenticated MySQL-compatible server port and the Anyquery process can access a targeted internal or metadata endpoint.

The described attack surface is unauthenticated, so application credentials may not be required. Network reachability to the exposed server port remains necessary.

The safest pattern is to prevent untrusted queries from initiating arbitrary outbound requests, use strict destination allowlists, and block private, loopback, link-local, and metadata address ranges at both the application and network layers.

Treat URL-fetching database extensions as privileged capabilities, require explicit authorization, validate destinations after resolution and redirects, restrict egress, and monitor query-driven outbound traffic.

Find out what's already
exploitable in your codebase.