Skip to content

An editorial team and a community building with AI

← All articles

News · StacklokLabs · 2 min read

Event date: · Published:

sqlite-mcp patches read-only mode bypass and SQL injection flaw

A GitHub security advisory disclosed a high severity flaw in StacklokLabs' sqlite-mcp server that let clients bypass read-only protections and modify databases. Version 0.1.2 fixes it.

StacklokLabs disclosed a high severity vulnerability in its sqlite-mcp server on November 19, 2026, through a GitHub security advisory describing how clients could bypass the tool's read-only protections through SQL statement chaining and an unsanitized table-name parameter, opening the door to database modification, file reads and file creation outside the intended scope.

What changed

  • The advisory GHSA-q433-mp6c-8v4f affects StacklokLabs/sqlite-mcp (Go) in versions before 0.1.2, and is fixed in 0.1.2.
  • GitHub rated the flaw High severity with a CVSS score of 8.2, publishing the advisory on November 19, 2026 at 22:25 UTC.
  • The execute_query tool only checked that a query began with SELECT, so extra statements after a semicolon ran unchecked.
  • The describe_table tool did not sanitize its table-name parameter before building SQL, enabling SQL injection.
  • The ATTACH DATABASE command could bypass read-only mode entirely, letting an attacker read other SQLite files or create files in writable locations.
  • The server listens on port 8080 by default with no built-in authentication.

What it means for people who build with AI

sqlite-mcp's entire premise was to give AI agents safe, read-only access to a database. The bypass shows how easily a read-only guarantee in an MCP tool can be defeated by SQL-level tricks its designers did not anticipate, since the server checked only that a query's first word was SELECT rather than validating the full statement. For anyone wiring an AI agent into a SQLite database through an MCP server, the flaw is a reminder that read-only enforcement needs to happen at the database connection level, not just in a tool's input validation.

What to do next

Teams running sqlite-mcp should upgrade to 0.1.2, which disables ATTACH DATABASE, enforces query-only mode on read-only connections, rejects multi-statement input and parameterizes table-name queries. The server's default of listening on port 8080 with no built-in authentication means it still needs an access control layer around it even after the patch.


Sources

Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.

sqlite-mcp patches read-only mode bypass and SQL injection flaw | vibecoding.inc