{"vuln_id":"GHSA-q433-mp6c-8v4f","aliases":["CVE-2026-130008"],"description":"sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table","published_at":"2026-11-19T22:25:53Z","modified_at":"2026-11-19T22:45:07.119775Z","first_seen_at":"2026-11-21T19:15:19.422480Z","severity":"high","severity_source":"ghsa","cvss_score":8.2,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","cwe":["CWE-89","CWE-863"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-q433-mp6c-8v4f"},"matched_alias":null,"items":[{"id":10973,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-q433-mp6c-8v4f: sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table","summary":"sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table\n\n### Summary\n\nIn 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`.\n\n### Details\n\n- **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.\n- **SQL injection in `describe_table`.** The `table_name` argument was interpolated into `PRAGMA table_info(%s)` with no guard.\n- **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.\n\nRead-write mode is not affected beyond its intended capabilities, apart from `ATTACH` reaching files other than the configured database.\n\n### Impact\n\n- Modify the database that read-only mode is meant to protect.\n- Read any SQLite database file the server process can read.\n- 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.\n\nThe 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.\n\n### Patches\n\nFixed in **v0.1.2**:\n\n- `ATTACH` is disabled in the engine (`SQLITE_LIMIT_ATTACHED` set to 0) on every connection that runs a statement.\n- Read-only connections set `query_only`.\n- `execute_query` rejects input that contains more than one statement.\n- `describe_table` passes the table name as a bound parameter.\n\n### Workarounds\n\nUpgrade 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.\n\n### Credits\n\nReported by @bebold6133.\n\nAffected: Go:github.com/StacklokLabs/sqlite-mcp\n\nFixed in: 0.1.2\n\nReferences:\nhttps://github.com/StacklokLabs/sqlite-mcp/security/advisories/GHSA-q433-mp6c-8v4f\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-130008\nhttps://github.com/StacklokLabs/sqlite-mcp/pull/112\nhttps://github.com/StacklokLabs/sqlite-mcp/commit/1da5a6582a4f9d90c778db5687ddcd0c39d2c1ec\nhttps://github.com/StacklokLabs/sqlite-mcp/commit/3c244d61cc0a9c0cc5e4d74719c1dc83edcfa339\nhttps://github.com/StacklokLabs/sqlite-mcp\nhttps://github.com/StacklokLabs/sqlite-mcp/releases/tag/v0.1.2","url":"https://osv.dev/vulnerability/GHSA-q433-mp6c-8v4f","published_at":"2026-11-19T22:25:53Z","updated_at":"2026-11-19T22:45:07.119775Z","fetched_at":"2026-11-21T19:15:55.946340Z","severity":"high","cvss_score":8.2,"epss":0.00365,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/StacklokLabs/sqlite-mcp","vuln_id":"CVE-2026-130008","vuln_ids":["CVE-2026-130008","GHSA-Q433-MP6C-8V4F"],"tags":["osv","go","fix-available"],"cluster_id":2198,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10973","html":"https://vulnwatch.ve1ve2.com/item/10973"}},{"id":2382,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-q433-mp6c-8v4f / CVE-2026-130008: sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table","summary":"sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table\n\n### Summary\n\nIn 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`.\n\n### Details\n\n- **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.\n- **SQL injection in `describe_table`.** The `table_name` argument was interpolated into `PRAGMA table_info(%s)` with no guard.\n- **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.\n\nRead-write mode is not affected beyond its intended capabilities, apart from `ATTACH` reaching files other than the configured database.\n\n### Impact\n\n- Modify the database that read-only mode is meant to protect.\n- Read any SQLite database file the server process can read.\n- 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.\n\nThe 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.\n\n### Patches\n\nFixed in **v0.1.2**:\n\n- `ATTACH` is disabled in the engine (`SQLITE_LIMIT_ATTACHED` set to 0) on every connection that runs a statement.\n- Read-only connections set `query_only`.\n- `execute_query` rejects input that contains more than one statement.\n- `describe_table` passes the table name as a bound parameter.\n\n### Workarounds\n\nUpgrade 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.\n\n### Credits\n\nReported by @bebold6133.\n\nAffected packages: go:github.com/StacklokLabs/sqlite-mcp\nPatched: github.com/StacklokLabs/sqlite-mcp 0.1.2","url":"https://github.com/advisories/GHSA-q433-mp6c-8v4f","published_at":"2026-11-19T22:25:53Z","updated_at":"2026-11-19T22:25:55Z","fetched_at":"2026-11-21T19:15:18.416794Z","severity":"high","cvss_score":8.2,"epss":0.00365,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/StacklokLabs/sqlite-mcp","vuln_id":"CVE-2026-130008","vuln_ids":["CVE-2026-130008","GHSA-Q433-MP6C-8V4F"],"tags":["ghsa","go","CWE-89","CWE-863"],"cluster_id":2198,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2382","html":"https://vulnwatch.ve1ve2.com/item/2382"}},{"id":8035,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-130008: sqlite-mcp is a Model Context Protocol server for SQLite. Prior to 0.1.2, the default read-only mode can be bypassed through execute_query, which accepts a lea…","summary":"sqlite-mcp is a Model Context Protocol server for SQLite. Prior to 0.1.2, the default read-only mode can be bypassed through execute_query, which accepts a leading SELECT while the SQLite driver executes trailing statements, and through describe_table, which interpolates the caller-controlled table_name into PRAGMA table_info. Either path can issue ATTACH DATABASE, which opens an attached file read-write despite mode=ro and can make the protected database writable, read other SQLite database files, or create a SQLite-format file at a path writable by the server process. Existing non-empty files that are not SQLite databases are refused and left unchanged. The server has no built-in authentication and listens on all interfaces at :8080 by default, so any client that can reach the port can invoke these tools unless an authenticating proxy is in place. This issue is fixed in version 0.1.2.\n\nReferences:\nhttps://github.com/StacklokLabs/sqlite-mcp/commit/1da5a6582a4f9d90c778db5687ddcd0c39d2c1ec\nhttps://github.com/StacklokLabs/sqlite-mcp/commit/3c244d61cc0a9c0cc5e4d74719c1dc83edcfa339\nhttps://github.com/StacklokLabs/sqlite-mcp/pull/112\nhttps://github.com/StacklokLabs/sqlite-mcp/releases/tag/v0.1.2\nhttps://github.com/StacklokLabs/sqlite-mcp/security/advisories/GHSA-q433-mp6c-8v4f","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-130008","published_at":"2026-11-18T17:17:38.080000Z","updated_at":"2026-11-18T18:19:08.587000Z","fetched_at":"2026-11-21T19:15:31.483855Z","severity":"high","cvss_score":8.2,"epss":0.00365,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-130008","vuln_ids":["CVE-2026-130008","GHSA-Q433-MP6C-8V4F"],"tags":["CWE-89","CWE-863"],"cluster_id":2199,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/8035","html":"https://vulnwatch.ve1ve2.com/item/8035"}}]}