llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/StacklokLabs/sqlite-mcp

GHSA-Q433-MP6C-8V4F

sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -31 d de la divulgación
Exposición7 hDesde la divulgación, 19 nov 2026, 5:25 p. m.
Detección24 minDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche v0.1.2
Monitoreo
Detectada +1
19 oct 26
19 nov 26
20 nov 26
19 oct 26
27 oct 26
4 nov 26
12 nov 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche v0.1.2 github.com/StacklokLabs/sqlite-mcp · -31 d desde divulgación
Divulgación Publicada GHSA-Q433-MP6C-8V4F divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
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.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
github.com/StacklokLabs/sqlite-mcp< 0.1.2
0.1.2
v0.1.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/StacklokLabs/sqlite-mcp
Corregida v0.1.2 -31 d v0.1.2 no afectada
Versiones corregidas0.1.2v0.1.2
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-130008
Otrahttps://github.com/StacklokLabs/sqlite-mcp/security/advisories/GHSA-q433-mp6c-8v4f
Otrahttps://github.com/StacklokLabs/sqlite-mcp/pull/112
Otrahttps://github.com/StacklokLabs/sqlite-mcp/commit/1da5a6582a4f9d90c778db5687ddcd0c39d2c1ec
Otrahttps://github.com/StacklokLabs/sqlite-mcp/commit/3c244d61cc0a9c0cc5e4d74719c1dc83edcfa339
Otrahttps://github.com/StacklokLabs/sqlite-mcp
Otrahttps://github.com/StacklokLabs/sqlite-mcp/releases/tag/v0.1.2

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.