The server classified a SQL query as read-only after looking at its opening statement. An input beginning with SELECT could include additional SQL statements, while a metadata-oriented describe_table path lacked equivalent containment. SQLite ATTACH was another route to reference a database file. The maintainer changed parsing and attachment handling in…
Inspect the ClaimsCase · 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:
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.
Evidence basis: CLM-2026-NOV21-SQLITE-MCP-READONLY-1 · CLM-2026-NOV21-SQLITE-MCP-READONLY-2 · CLM-ENR271-SQLITE-MCP-READONLY · Maintainer advisory: SQLite MCP read-only guard accepted statement chains and database attachment paths
At a glance
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…
Read the implicationsThe 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.
Limits and uncertaintyFull account
The server classified a SQL query as read-only after looking at its opening statement. An input beginning with SELECT could include additional SQL statements, while a metadata-oriented describe_table path lacked equivalent containment. SQLite ATTACH was another route to reference a database file. The maintainer changed parsing and attachment handling in 0.1.2, because a display-only tool label did not constrain effects performed by SQLite.
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.
Mechanism and trust boundary
- 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
- 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
- supportsMaintainer advisory: SQLite MCP read-only guard accepted statement chains and database attachment pathsprimary disclosure
Summary: multi-statement and describe_table read-only bypass
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
- supportsMaintainer advisory: SQLite MCP read-only guard accepted statement chains and database attachment pathsprimary disclosure
GHSA-q433-mp6c-8v4f: SELECT chain, ATTACH and version 0.1.2
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
- supportsMaintainer advisory: SQLite MCP read-only guard accepted statement chains and database attachment pathsprimary disclosure
Advisory context: reported scope and exploitation information
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
- Nov 21, 2026 · Published version · first publication · revision 272