Summary
CVE-2026-86123 is a critical vulnerability in SQL Chat, an open-source chat-based SQL client and editor, in which the /api/connection/* API endpoints accept client-supplied database connection parameters (host, port, credentials, engine type) and use them to open connections and execute SQL statements without requiring any authentication. This allows a remote, unauthenticated attacker to force the SQL Chat server to connect to and execute arbitrary SQL queries against attacker-specified database hosts, effectively turning the application into an SSRF and database-access proxy. The issue carries a CVSS v3.1 base score of 8.7 (High) / CVSS v4.0 score of 9.4 (Critical).
Technical details
- Root cause: The API route handlers under
/api/connection/(includingexecute,test,db_schema, anddb) build a database connector directly from connection parameters supplied in the request body, with no session, token, or identity verification performed before the connector is instantiated and used. - Trigger conditions: An attacker sends a crafted POST request to one of the affected endpoints (e.g.,
/api/connection/execute) containing aconnectionobject (host, port, engine type, credentials) plus adbname and SQLstatement; the server executes the request server-side and returns query results or error details to the requester. - Attack vector: Network — no authentication or user interaction is required. Because the connection target is entirely attacker-controlled, the endpoints can also be abused to probe or reach internal-only hosts and services reachable from the SQL Chat server (SSRF), in addition to any externally reachable database the attacker already knows credentials for.
- Impact: Unauthorized execution of arbitrary SQL statements against attacker-specified or internal databases, enumeration of internal network/database infrastructure, and potential exfiltration of data from systems the SQL Chat server can reach. The vulnerability is scored with high confidentiality and integrity impact.
Affected software
- Product: SQL Chat (
sqlchat/sqlchat, self-hosted deployments) - Affected versions: All versions/commits up to and including git commit
665af875413affadfeefff81794f1d7758782bc2 - Vulnerable endpoints:
POST /api/connection/execute,POST /api/connection/test,POST /api/connection/db_schema,POST /api/connection/db
Severity
- CVSS v3.1 Base Score: 8.7 (High) —
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N - CVSS v4.0 Base Score: 9.4 (Critical) —
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
Mitigation and recommended actions
- Immediate: As of this writing, no fixed release or patched commit addressing this issue has been published by the SQL Chat maintainers; the referenced GitHub issue remains open with no confirmed remediation commit. Security teams should monitor the
sqlchat/sqlchatrepository for a fix and upgrade to a patched version as soon as one is released. - If no patch is available:
- Do not expose self-hosted SQL Chat instances directly to the internet; place them behind authentication (e.g., a reverse proxy with SSO/basic auth) that gates access to all
/api/connection/*routes. - Restrict outbound network access from the host running SQL Chat so it cannot reach internal/private address ranges (RFC1918, loopback, link-local) that should not be queryable by the application.
- Apply network-level allowlisting so the application can only connect to explicitly approved database hosts.
- Monitor logs for unexpected connection attempts to unfamiliar hosts or ports originating from the SQL Chat deployment.
- Do not expose self-hosted SQL Chat instances directly to the internet; place them behind authentication (e.g., a reverse proxy with SSO/basic auth) that gates access to all

