In read-only mode (the default), a client that can call the MCP tools can write to the database the server is meant to expose read-only, read other SQLite files, and create new SQLite files anywhere the server process can write. There are two ways in: statement chaining through execute_query, and SQL injection through describe_table.
execute_query. The only check was that the query starts with SELECT. The modernc.org/sqlite driver runs every ;-separated statement in one call, so anything after SELECT 1; ran unchecked.describe_table. The table_name argument was interpolated into PRAGMA table_info(%s) with no guard.ATTACH DATABASE opens a file read-write regardless of the main connection's mode=ro. Attaching the protected database itself made it writable. Attaching another path read that file, or created it if it did not exist.Read-write mode is not affected beyond its intended capabilities, apart from ATTACH reaching files other than the configured database.
The server has no built-in authentication and, by default, listens on :8080 on all interfaces. Unless it is deployed behind an authenticating proxy, anyone who can reach that port can exploit this.
Fixed in v0.1.2:
ATTACH is disabled in the engine (SQLITE_LIMIT_ATTACHED set to 0) on every connection that runs a statement.query_only.execute_query rejects input that contains more than one statement.describe_table passes the table name as a bound parameter.Upgrade to v0.1.2. If you cannot upgrade, don't expose the server to untrusted clients: keep it on a loopback or private interface, or run it behind an authenticating proxy such as ToolHive. Mount only the database you intend to expose, read-only at the filesystem or container level.
Reported by @bebold6133.
{
"cwe_ids": [
"CWE-863",
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-19T22:25:53Z",
"nvd_published_at": "2026-11-18T17:17:38Z",
"severity": "HIGH"
}