/

CVE-2026-54629

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in Anyquery SQLite Server Port

CVE-2026-54629

Deferred

Vulnerability type

Category:

Path Traversal and Arbitrary File Read

CWE:

CWE-22, CWE-73, CWE-284, CWE-552, CWE-862

Impact:

Sensitive Information Disclosure

Severity:

HIGH RISK

(7.5)

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 server versions before 0.4.5 expose file-backed SQLite virtual table modules through the unauthenticated MySQL-compatible server port. A remote attacker may use these modules to read files accessible to the Anyquery process when network access to the server is available.

Affected context

The issue occurs in Anyquery deployments where the MySQL-compatible server port is reachable and file-backed SQLite virtual table modules, such as csv_reader or log_reader, are exposed without authentication, authorization, or directory restrictions. The risk is higher when the server process can access sensitive operating-system files, application configuration, credentials, or private keys.

Exploit preconditions

  • Attack surface: Anyquery's MySQL-compatible server port
  • Required access: Network connectivity to the exposed port; authentication may not be required
  • Trigger point: Processing SQL statements that create file-backed SQLite virtual tables
  • Why exploitation is possible: User-controlled paths are passed to file-reading modules without sufficient authorization or directory-boundary enforcement

Why this happens

The vulnerability results from exposing file-backed virtual table modules through an unauthenticated SQL interface while allowing the requested file location to be selected by the client. This behavior maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with related aspects of CWE-73: External Control of File Name or Path. The server treats attacker-influenced paths as trusted input and reads files using the permissions of its own process.

Potential impact

  • Sensitive system or application configuration may be disclosed
  • Credentials, tokens, or private keys could be exposed
  • Database contents or operational logs may become readable
  • Information disclosure could support follow-on attacks
  • The confidentiality of files accessible to the server process may be reduced

General mitigation guidance

Mitigation generally focuses on reducing the file-reading capability exposed through network interfaces and enforcing strong trust boundaries around paths.

Common defensive patterns include:

  • Requiring authentication and authorization before accepting SQL requests
  • Disabling file-backed virtual table modules when they are not required
  • Restricting readable paths to a dedicated, non-sensitive directory
  • Canonicalizing and validating paths against an explicit allowlist
  • Running the server with a least-privilege service account
  • Isolating sensitive credentials and private keys from the service filesystem
  • Limiting network exposure to trusted clients or protected network segments
  • Applying secure-by-default configuration for server listeners and extensions

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis for user-controlled paths passed to file or virtual table APIs
  • Code review checks for unauthenticated database interfaces and unrestricted file modules
  • Configuration audits for exposed MySQL-compatible ports and enabled file readers
  • Policy enforcement requiring authentication, path allowlists, and least-privilege service accounts
  • Runtime monitoring for unusual virtual table creation or reads of sensitive filesystem locations
  • Automated security review tools that flag external path control and missing authorization checks

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-mf78-3rpf-r784

Frequently asked

questions

It may be remotely exploitable when the Anyquery MySQL-compatible server port is network-accessible and the exposed modules accept client-controlled file paths.

The described server interface does not require authentication or authorization for the affected functionality, although network controls may still limit who can reach it.

The safest pattern is to remove unnecessary file-backed modules from the network-facing interface, require authentication and authorization, and restrict permitted paths to a dedicated allowlisted directory.

Treat all client-supplied paths as untrusted, enforce canonical path validation, run services with minimal filesystem permissions, and continuously audit exposed database interfaces and extension capabilities.

Find out what's already
exploitable in your codebase.