Skip to content
Heist/ feed
Back to feed
Critical

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-50006
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 03:28 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 14 Sept 2026, 19:56 UTC

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.

osv:CVE-2026-50006
Complete source record
{
  "id": "c60d777e81da33b0daccffb10bbf996ee335ea40f21e607e52f91a7637617ef9",
  "url": "https://osv.dev/vulnerability/CVE-2026-50006",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Anyquery: Arbitrary File Write (AFW) which could lead to Remote Code Execution (RCE) via Unrestricted ATTACH DATABASE in Server Mode",
    "summary": "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.",
    "evidence": "osv:CVE-2026-50006",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-50006",
      "aliases": [
        "CVE-2026-50006",
        "GHSA-xrcf-6jh3-ggvx",
        "GO-2026-5979"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/julien040/anyquery",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "66d5e684cd0a1a4086758aadaf3b22aee4e6e498"
                },
                {
                  "fixed": "27f84fc168310455eaf81ec4ba87eed20298670c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.4.5"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "27f84fc168310455eaf81ec4ba87eed20298670c"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "66d5e684cd0a1a4086758aadaf3b22aee4e6e498"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "0.4.5"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.4.4",
            "0.4.3",
            "0.4.2",
            "0.4.1",
            "0.4.0",
            "v0.1.6",
            "0.3.1",
            "v0.1.5",
            "v0.1.4",
            "0.3.0",
            "0.2.2",
            "0.2.1",
            "0.2.0",
            "v0.1.3",
            "v0.1.2",
            "0.1.3",
            "0.1.2",
            "v0.1.1",
            "0.1.1",
            "0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-50006.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.813080383Z",
      "provider": "osv",
      "references": [
        "https://github.com/julien040/anyquery/releases/tag/0.4.5",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50006.json",
        "https://github.com/julien040/anyquery/security/advisories/GHSA-xrcf-6jh3-ggvx",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-50006",
        "https://github.com/julien040/anyquery/commit/27f84fc168310455eaf81ec4ba87eed20298670c"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22",
          "CWE-284",
          "CWE-434",
          "CWE-73",
          "CWE-862"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50006.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-50006",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 500027,
  "published_at": "2026-09-14T19:56:39.502+00:00"
}