HIGH · CVSS 3.1 8.2 EPSS 0.5% · 39th percentile CWE-863CWE-89

CVE-2026-130008: sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table

Published 2026-11-19 · Updated 2026-11-23 · Also known as GHSA-q433-mp6c-8v4f, GO-2026-7006

Summary

The sqlite-mcp package contains authorization bypass and SQL injection vulnerabilities that allow read-only mode to be compromised through statement chaining and parameter interpolation. Engineering teams using affected versions should upgrade immediately.

Who is affected

In default read-only deployments, unauthorized attackers can modify protected databases, read arbitrary SQLite files accessible to the process, and create or write to new SQLite files. These actions can be achieved via statement chaining in execute_query or SQL injection in describe_table combined with ATTACH DATABASE.

Exploitability

The vulnerability carries a CVSS base score of 8.2 (High) with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N, indicating network exploitation requires no privileges or user interaction. The EPSS score is 0.004 with a 0.310 percentile, and CISA KEV status is no.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-23. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Go github.com/StacklokLabs/sqlite-mcp >= 0, < 0.1.2 0.1.2 go get github.com/StacklokLabs/[email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityLow
IntegrityHigh
AvailabilityNone

FAQ

What causes the read-only mode bypass in sqlite-mcp?

The bypass occurs because execution only checked that queries started with SELECT while permitting multiple semicolon-separated statements, and the describe_table tool unsafely interpolated table names.

Are read-write deployments affected?

Read-write mode is not affected beyond its intended capabilities, except for the ATTACH command's ability to reach files outside the configured database.

What versions fix these vulnerabilities?

Version 0.1.2 of github.com/StacklokLabs/sqlite-mcp contains the fixes for these issues.

Original advisory description
### Summary 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`. ### Details - **Statement chaining in `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. - **SQL injection in `describe_table`.** The `table_name` argument was interpolated into `PRAGMA table_info(%s)` with no guard. - **Escaping read-only mode.** Through either path, `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. ### Impact - Modify the database that read-only mode is meant to protect. - Read any SQLite database file the server process can read. - Create new SQLite-format files anywhere the server process can write, or write to existing SQLite or empty files. Existing non-empty files that are not SQLite databases are refused and left unchanged. 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. ### Patches Fixed in **v0.1.2**: - `ATTACH` is disabled in the engine (`SQLITE_LIMIT_ATTACHED` set to 0) on every connection that runs a statement. - Read-only connections set `query_only`. - `execute_query` rejects input that contains more than one statement. - `describe_table` passes the table name as a bound parameter. ### Workarounds 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. ### Credits Reported by @bebold6133.

References

Source records: GHSA-q433-mp6c-8v4f, GO-2026-7006 (OSV.dev) · EPSS by FIRST, 2026-11-26.