CVE-2026-47253 in Anyqueryinfo

Summary

by MITRE • 09/14/2026

Anyquery is an SQL query engine built on top of SQLite. Prior to 0.4.5, the clear_plugin_cache(plugin) SQL scalar function in namespace/other_functions.go passes the caller-controlled plugin parameter through path.Join to os.RemoveAll without rejecting traversal segments. A low-privileged bearer-token holder can invoke the function through the /v1/query HTTP endpoint, causing path.Join to resolve .. segments outside $XDG_CACHE_HOME/anyquery/plugins/ and os.RemoveAll to recursively delete any reachable directory writable by the Anyquery server process. This causes permanent data loss and denial of service without disclosing file contents. This issue is fixed in version 0.4.5.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 09/14/2026

The vulnerability identified in Anyquery prior to version 0.4.5 represents a critical path traversal flaw within its SQL query engine, specifically affecting the clear_plugin_cache function implemented as an SQL scalar function. Anyquery operates on top of SQLite and exposes functionality through HTTP endpoints, allowing users with low-privileged bearer-token access to execute specific functions via the /v1/query interface. The core technical defect lies in how the plugin parameter is processed before being passed to operating system commands. Instead of validating or sanitizing the input for directory traversal sequences such as double dots (..), the application directly feeds this user-controlled data into path.Join, which then passes the resolved absolute path to os.RemoveAll. This lack of validation allows an attacker to manipulate the intended cache clearing operation by injecting relative paths that escape the designated plugin directory structure.

From a technical perspective, the exploitation mechanism relies on the behavior of standard library functions in Go where path.Join normalizes file paths but does not inherently prevent traversal outside of specified base directories if the input contains absolute or deeply nested relative components. When an attacker provides a parameter containing sequences like ../../../../etc, path.Join resolves this against the expected plugin directory root, resulting in a target path that points to arbitrary locations on the filesystem accessible by the Anyquery server process identity. Consequently, when os.RemoveAll is invoked with this maliciously crafted absolute path, it recursively deletes all files and directories within that location without any further checks or confirmation prompts. This behavior transforms what was intended as a maintenance function into a powerful destructive tool capable of wiping critical system data.

The operational impact of this vulnerability is severe, characterized primarily by permanent data loss and denial of service conditions for the Anyquery infrastructure. Because os.RemoveAll deletes directories recursively, an attacker can target essential configuration files, database storage locations, or other application-critical assets located outside the plugin cache directory. This results in immediate disruption of services as the application loses access to necessary resources required for operation. Unlike vulnerabilities that lead to unauthorized data disclosure, this flaw is strictly destructive; it does not expose sensitive information but rather eliminates it permanently unless backups are available and restorable. The ability to execute such actions with only a low-privileged bearer token significantly lowers the barrier for exploitation, allowing less privileged actors to cause substantial damage to the system integrity and availability.

This vulnerability aligns closely with CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal or directory traversal. The failure to restrict file operations to a specific sandboxed area allows external control over which files are affected by privileged functions. Furthermore, the impact on system availability and data integrity maps directly to MITRE ATT&CK technique T1485: Data Destruction, where an adversary modifies or destroys data stored in local or remote systems to disrupt availability or hinder incident response efforts. The exploitation vector through a web service endpoint also relates to CWE-79: Improper Neutralization of Input During Web Page Generation if one considers the broader context of input handling, though the primary flaw is strictly file system related rather than code injection.

Mitigation for this vulnerability requires immediate upgrading to Anyquery version 0.4.5 or later, where the developers have addressed the path traversal issue by implementing proper validation mechanisms. In addition to updating software, defensive coding practices should be enforced across all applications handling user-supplied paths. This includes strictly validating input against a whitelist of allowed characters and ensuring that resolved file paths remain within an expected base directory using canonicalization checks before performing any destructive operations like deletion or modification. Principle of least privilege should also be applied by running the Anyquery service with minimal filesystem permissions, limiting the potential blast radius even if such vulnerabilities are exploited in other components. Regular auditing of input validation logic and employing static analysis tools can help identify similar flaws early in the development lifecycle to prevent recurrence.

Responsible

GitHub M

Reservation

05/19/2026

Disclosure

09/14/2026

Moderation

accepted

CPE

ready

EPSS

0.00441

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!