The ClickHouse driver builds its HTTP request URL as "$this->serviceUrl/?database=$db" with no URL-encoding of $db . The database name comes directly from $_GET["db"] (via admin/include/connect.inc.php:17-18 → selectDatabase() → $this->dbName ). PHP decodes %26 in the AdminNeo request to & , and that & is re-inserted verbatim into the URL sent to ClickHouse, so a crafted db value injects arbitrary extra ClickHouse HTTP-interface parameters.
selectDatabase() always returns true and never validates the name against the real database list, and DB is applied on every request, including plain GET s. Because AdminNeo's CSRF token only protects POST , a cross-site GET link (an tag or top-level ) runs this against a logged-in victim.
The ClickHouse HTTP interface accepts the start of a statement in the query URL parameter (the POST body is appended), and accepts per-request settings as URL parameters. So the injected parameters can prepend attacker SQL to every statement AdminNeo issues, or alter session settings — the same cross-site data-modification exposure the vendor just addressed for the PostgreSQL "SQL" operator (commit 22b79824 , "Disallow modifying data … (CSRF)").
Tested: AdminNeo 5.9.1-dev , branch main , commit a4fe19b3 (unchanged on origin/main as of 2026-11-04).
Affected range: all releases shipping the ClickHouse driver with the unencoded ?database=$db URL build; still present on main . (The driver is labelled "ClickHouse (alpha)".)
admin/drivers/clickhouse.inc.php:32 — get_url("$this->serviceUrl/?database=$db", ...) , $db not URL-encoded.
admin/drivers/clickhouse.inc.php:108-113 — selectDatabase() stores the name unvalidated, always returns true .
admin/include/connect.inc.php:17-18 — DB (from $_GET["db"] ) passed to selectDatabase() on every request.
Reproduction (proof of concept)
Verified end-to-end with AdminNeo pointed at an instrumented local HTTP endpoint standing in for ClickHouse (it logs the exact request line AdminNeo sends and returns a minimal valid X-ClickHouse-Summary + JSON response).
Log in to the ClickHouse driver.
As the logged-in victim, request a URL whose db parameter contains an encoded & and an extra parameter: ?clickhouse= &username=default&db=default%26injected_param%3D1 .
Observed — the request lines AdminNeo sent to the ClickHouse endpoint:
The attacker-supplied injected_param=1 is present as a distinct URL parameter on every subsequent query, demonstrating control of the ClickHouse HTTP query string. Substituting query= for the benign injected_param prepends attacker SQL to the request ClickHouse executes.
A victim logged in to the ClickHouse driver who opens an attacker-controlled link causes ClickHouse to execute attacker-chosen statements under the victim's credentials (data read/modify/drop), bypassing the CSRF token because the vector is GET . Unauthenticated → requires a logged-in victim + one click; low complexity.
URL-encode the database name: urlencode($db) or http_build_query(["database" => $db]) in rootQuery() .
Validate the database name against get_databases() in selectDatabase() .
Consider the same untrusted-connection / read-only handling applied to PostgreSQL in 22b79824 for GET-reachable ClickHouse queries.
Not in the published advisories ( GHSA-77qq-q8fv-x45v upstream concerns the ClickHouse login-error response body, a different issue). No GHSA id in the git trail on this line; absent from CHANGELOG.md . Still present on origin/main at a4fe19b3 as of 2026-11-04.
CWE-88 (Argument/Parameter Injection), CWE-352 (CSRF)
ClickHouse HTTP interface:
Related fix pattern: commit 22b79824
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
