CVE-2026-50006 Anyquery: Arbitrary File Write (AFW) which could lead to Remote Code Execution (RCE) via Unrestricted ATTACH DATABASE in Server Mode

Critical 9.1 Published Updated

Remote attackers can write arbitrary files via unrestricted SQL ATTACH commands, potentially leading to code execution or denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-50006?

CVE-2026-50006 is a critical path traversal vulnerability in julien040 anyquery, published on 14 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Anyquery is an SQL query engine built on top of SQLite. Prior to 0.4.5, anyquery server forwards unauthenticated SQL from its MySQL-compatible server port to SQLite without restricting ATTACH DATABASE filesystem targets. A remote attacker can select any path writable by the Anyquery server process, cause SQLite to create a database file there, and place attacker-controlled table content in that file. This permits arbitrary file creation or overwrite, causing filesystem integrity loss and denial of service; remote code execution is possible only when another service interprets the written file or the process has a suitably privileged writable target. This issue is fixed in version 0.4.5.

Weakness: CWE-862, CWE-434, CWE-284, CWE-73, CWE-22

Which versions are affected by CVE-2026-50006?

3 open source packages ship an affected version, including github.com/julien040/anyquery.

PackageAffectedFixed in
github.com/julien040/anyquery GoAll versionsNone
github.com/julien040/anyquery GoAll versionsNone
github.com/julien040/anyquery GoAll versionsNone

How do I fix CVE-2026-50006?

Upgrade to a fixed version.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-50006 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50006 exists.

Sources

Also known as GHSA-xrcf-6jh3-ggvx, GO-2026-5979.

Is CVE-2026-50006 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free