CVE-2026-130008: sqlite-mcp read-only mode could be bypassed to write databases and read other files

A high-severity vulnerability in sqlite-mcp, a Model Context Protocol server for SQLite, allowed attackers to bypass read-only mode and write to protected databases through statement chaining and SQL injection. Fixed in version 0.1.2.

Christopher Ort
By i10X News Desk · Reviewed by Christopher Ort · 3 min read
Share
A developer reviewing security alerts on a laptop screen in a dimly lit office, with code visible on a secondary monitor
Image: AI-generated, i10X
On this page
  1. Quick Take
  2. In plain English
  3. What happened
  4. What you should do
  5. What it means
  6. Sources
i10X Quick Take

Quick Take

  1. What: CVE-2026-130008, a read-only mode bypass in sqlite-mcp allowing unauthorized database writes and file access
  2. Who is affected: Users running sqlite-mcp versions before 0.1.2, especially those exposing the server on public interfaces without authentication
  3. Severity: High (CVSS 8.2), enabling attackers to modify protected databases, read arbitrary SQLite files, and create new files
  4. Fixed version: 0.1.2
  5. What to do: Upgrade to sqlite-mcp v0.1.2 immediately

In plain English

A security flaw in sqlite-mcp, a tool that lets AI agents query SQLite databases, allowed attackers to write to databases that were supposed to be read-only. The tool had two problems: it didn’t check for multiple SQL commands chained together, and it didn’t properly sanitize table names. Attackers could use these flaws to modify the protected database, read other SQLite files on the system, or create new files wherever the server could write. The server listens on port 8080 by default with no password, so anyone who could reach that port could exploit this.

What you should do: If you use sqlite-mcp, upgrade to version 0.1.2 right away. If you don’t use this tool (most people don’t), you can ignore this.

What happened

The GitHub advisory for CVE-2026-130008 describes in sqlite-mcp, a Model Context Protocol server for SQLite. The vulnerability allowed attackers to bypass the default read-only mode through two attack vectors.

The first vector exploited statement chaining in the execute_query tool. The server only checked that queries started with SELECT, but the modernc.org/sqlite driver executes every semicolon-separated statement in a single call. An attacker could submit SELECT 1; <malicious statement> and the malicious statement would run unchecked.

The second vector was SQL injection in the describe_table tool. The server interpolated the table_name argument directly into PRAGMA table_info(%s) with no sanitization or parameterization.

Through either path, attackers could issue ATTACH DATABASE commands. SQLite’s ATTACH opens files read-write regardless of the main connection’s mode=ro setting. Attackers could attach the protected database itself to make it writable, attach other SQLite files to read them, or create new SQLite-format files at any path writable by the server process. Existing non-empty files that were not SQLite databases were refused and left unchanged.

The server has no built-in authentication and by default listens on all interfaces at port 8080, making it exploitable by any client that can reach that port.

The vulnerability was reported by @bebold6133 and assigned CVE-2026-130008 with a CVSS score of 8.2.

What you should do

Upgrade to sqlite-mcp version 0.1.2 immediately. The fixed version disables ATTACH at the engine level by setting SQLITE_LIMIT_ATTACHED to 0 on every connection that runs a statement. Read-only connections now set query_only. The execute_query tool rejects input containing more than one statement, and describe_table passes the table name as a bound parameter.

If you cannot upgrade immediately, do not 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.

What it means

This vulnerability highlights risks in Model Context Protocol servers that expose database access to AI agents. The default configuration (no authentication, listening on all interfaces) combined with insufficient input validation created a high severity security gap.

The fix combines several layers: ATTACH is disabled in the SQLite engine on every connection that runs a statement, read-only connections set query_only, execute_query rejects multi-statement input, and describe_table binds the table name as a parameter. The changes landed in commits 3c244d6 and 1da5a65 and pull request #112.

Organizations deploying MCP servers should ensure they run behind authentication, validate all inputs, and apply principle of least privilege at both the application and filesystem levels.

Read-only modes in database MCP servers have been bypassed before: see pgEdge Postgres MCP Server read-only bypass via SQL statement smuggling and DQL injection in Dynatrace MCP Server bypassing read-only safeguards. New cases are tracked in our AI Security hub.

Sources

  • NVD CVE-2026-130008
  • GitHub Security Advisory GHSA-q433-mp6c-8v4f
  • sqlite-mcp v0.1.2 release
  • Pull request #112
  • Commit 3c244d6
  • Commit 1da5a65
Christopher Ort

Christopher Ort

Christopher Ort is the editor of i10X News at i10x.ai. He has worked hands-on with AI tools, models and agent workflows for years and leads i10X’s coverage of AI launches, funding and research. He is the author of “The Style Penalty”, an SSRN study on how frontier AI models judge AI-written CVs, covered by heise online and t3n.

Editor's picks

  1. Georgia Tech’s Academic AI Playbook: 20 Lessons From 67 Real Courses, Free to Reuse
  2. Arcfront’s $1B Run Rate: What the AI Data Startup Confirms and What It Doesn’t
  3. GPT-6.2 Astra Tops Blueprint-Bench 2, 70% Above May Leader GPT-5.5
  4. Deutsche Telekom Puts 100 Million Euros Into Mistral for Sovereign AI in Germany
  5. Inkling 2 Mini: Thinking Machines’ Looped Open Model Tops Qwen on Coding Tests