Vulnerabilities in pkg:golang/github.com/StacklokLabs/sqlite-mcp

PACKAGE
Advisory Identifier: GHSA-q433-mp6c-8v4f
Advisory Summary

CVE-2026-130008 is a HIGH (CVSS 8.2) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting sqlite-mcp libraries in the Go ecosystem. The issue involves read-only mode bypass via statement chaining and sql injection in describe_table. Remediation is available by upgrading affected packages to version 0.1.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/StacklokLabs/sqlite-mcp

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/StacklokLabs/sqlite-mcp. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-q433-mp6c-8v4f CVE-2026-130008 HIGH sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table

CVE-2026-130008 at a Glance

CVE Identifier CVE-2026-130008
GHSA Identifier GHSA-q433-mp6c-8v4f
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product sqlite-mcp
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-130008

To remediate this vulnerability, upgrade all affected sqlite-mcp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/StacklokLabs/sqlite-mcp fixed: 0.1.2
Upgrade github.com/StacklokLabs/sqlite-mcp to 0.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/StacklokLabs/sqlite-mcp

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-130008, inspect your project dependencies for sqlite-mcp:

inspect dependencies for github.com/StacklokLabs/sqlite-mcp

Analyze the terminal output to locate any version of sqlite-mcp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In sqlite-mcp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary In 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`. ### Details - **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. - **SQL injection in `describe_table`.** The `table_name` argument was interpolated into `PRAGMA table_info(%s)` with no guard. - **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. Read-write mode is not affected beyond its intended capabilities, apart from `ATTACH` reaching files other than the configured database. ### Impact - Modify the database that read-only mode is meant to protect. - Read any SQLite database file the server process can read. - 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. The 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. ### Patches Fixed in **v0.1.2**: - `ATTACH` is disabled in the engine (`SQLITE_LIMIT_ATTACHED` set to 0) on every connection that runs a statement. - Read-only connections set `query_only`. - `execute_query` rejects input that contains more than one statement. - `describe_table` passes the table name as a bound parameter. ### Workarounds Upgrade 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. ### Credits Reported by @bebold6133.

CVE-2026-130008 Affected sqlite-mcp Versions

1 component(s)
Fixed Versions:
0.1.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/StacklokLabs/sqlite-mcp
Go
< 0.1.2
0.1.2

References

Frequently Asked Questions

What is CVE-2026-130008?
CVE-2026-130008 is a security vulnerability in sqlite-mcp involving Read-only mode bypass via statement chaining and SQL injection in describe_table under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which sqlite-mcp versions are affected?
Affected versions include releases prior to 0.1.2 across affected packages: github.com/StacklokLabs/sqlite-mcp.
What version fixes CVE-2026-130008?
Upgrading to 0.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/StacklokLabs/sqlite-mcp affected?
Yes, github.com/StacklokLabs/sqlite-mcp is affected in releases prior to 0.1.2. Upgrade your dependency to 0.1.2 or later.
What is the CVSS score of CVE-2026-130008?
CVE-2026-130008 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2026-130008?
CVE-2026-130008 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Go dependencies for CVE-2026-130008?
Run the dependency tree command: 'inspect dependencies for github.com/StacklokLabs/sqlite-mcp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q433-mp6c-8v4f",
  "modified" : "2026-11-19T22:25:53Z",
  "published" : "2026-11-19T22:25:53Z",
  "aliases" : [ "CVE-2026-130008" ],
  "summary" : "sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/StacklokLabs/sqlite-mcp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/StacklokLabs/sqlite-mcp/security/advisories/GHSA-q433-mp6c-8v4f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-130008"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/StacklokLabs/sqlite-mcp/pull/112"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/StacklokLabs/sqlite-mcp/commit/1da5a6582a4f9d90c778db5687ddcd0c39d2c1ec"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/StacklokLabs/sqlite-mcp/commit/3c244d61cc0a9c0cc5e4d74719c1dc83edcfa339"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/StacklokLabs/sqlite-mcp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/StacklokLabs/sqlite-mcp/releases/tag/v0.1.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863", "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-19T22:25:53Z",
    "nvd_published_at" : "2026-11-18T17:17:38Z"
  }
}