Case · DiggingBeagle record

SQLite MCP read-only guard accepted statement chains and database attachment paths

A read-only SQL tool could execute a second statement or ATTACH operation despite the initial SELECT check.

Published by DiggingBeagle:

Scope

Stacklok sqlite-mcp before 0.1.2; an attacker can influence SQL passed to the MCP service with filesystem permissions available to the server.

Assessment profile

Assessment method
Setting
research demonstration
Exploitation
demonstrated
Evidence
Grade B
Remediation
patch available
AI role
AGAINST AI
Basis and provenance

Vendor or researcher primary evidence establishes the stated mechanism and its bounds; the public record does not support a population-wide impact score, prevalence or generalization to installations without the prerequisites.

Assessed Nov 21, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    Read-only tool accepts SQL controlled by caller

    A query begins with SELECT but also contains another statement, or it uses the separately affected describe_table entry point.

    Boundary: model-selected SQL -> read-only classification

  2. 02

    Parser executes prohibited SQL effect

    SQLite can perform a write or ATTACH depending on the path and filesystem permissions, despite the initial read-only check.

    Boundary: declared read-only tool -> database and file state

Claims & evidence

CLM-ENR271-SQLITE-MCP-READONLYThe SQLite MCP maintainer identifies statement chaining and the describe_table route as two separate ways to bypass the intended read-only SQL restrictions.supported

Basis: reported finding

Link to claim
CLM-2026-NOV21-SQLITE-MCP-READONLY-1A read-only SQL tool could execute a second statement or ATTACH operation despite the initial SELECT check.supported

Basis: reported finding

Link to claim
CLM-2026-NOV21-SQLITE-MCP-READONLY-2The original maintainer advisory does not establish a known number of real victims or a measured criminal campaign.supported

Basis: reported finding

Link to claim

Implications

A read-only policy that checks only the first SQL verb cannot stop a later statement in the same input. Stacklok also documented a describe_table route and database attachment behavior, so the corrected boundary is SQL parsing plus database-file permissions rather than a model-visible read-only designation. The report demonstrates unauthorized database mutations under specific permissions, not arbitrary command execution on every host.

Controls and mitigations

  • Apply the vendor-provided fixed version where established and restrict network and filesystem rights independently of the model.
  • Replay the documented path with a low-privilege synthetic account and verify the result at the actual side-effect boundary.

Unknowns and contradictions

  • The advisory does not show generic arbitrary code execution. A read-only host filesystem, inaccessible database paths or valid single-statement enforcement constrains the outcome; non-SQLite existing files are not automatically overwritten.

Sources and citation

Material revision history

  1. Nov 21, 2026 · Published version · first publication · revision 272