/

CVE-2026-118378

Severity:

HIGH RISK

(7.8)

SQL Injection (CWE-89) in Tabularis SQLite Driver Component

CVE-2026-118378

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database access and modification

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Tabularis before 0.28.0 contains an SQL injection vulnerability in its SQLite driver through the describe_table tool. An attacker, or an AI agent influenced by untrusted content, may provide a crafted table_name that appends SQLite statements, enabling data access or modification and potentially bypassing read-only controls.

Tabularis before 0.28.0 contains an SQL injection vulnerability in its SQLite driver through the describe_table tool. An attacker, or an AI agent influenced by untrusted content, may provide a crafted table_name that appends SQLite statements, enabling data access or modification and potentially bypassing read-only controls.

Affected context

The vulnerability occurs in Tabularis deployments using the SQLite driver and exposing the MCP describe_table tool. It becomes risky when the tool incorporates an untrusted table_name into a quoted SQLite PRAGMA expression without safely separating data from SQL syntax. Configurations that rely on read-only mode or write approval may still be exposed if stacked statements are accepted before those controls take effect.

The vulnerability occurs in Tabularis deployments using the SQLite driver and exposing the MCP describe_table tool. It becomes risky when the tool incorporates an untrusted table_name into a quoted SQLite PRAGMA expression without safely separating data from SQL syntax. Configurations that rely on read-only mode or write approval may still be exposed if stacked statements are accepted before those controls take effect.

Exploit preconditions

  • Attack surface: MCP describe_table tool backed by the SQLite driver
  • Required access: Ability to invoke the MCP tool, directly or through an AI agent or integration
  • Trigger point: Processing a crafted table_name argument
  • Why exploitation is possible: The value is incorporated into a quoted PRAGMA argument in a way that may allow the quote to be closed and additional SQLite statements to execute
  • Control limitation: Read-only settings or write approval mechanisms may not prevent statements injected into the database request
  • Attack surface: MCP describe_table tool backed by the SQLite driver
  • Required access: Ability to invoke the MCP tool, directly or through an AI agent or integration
  • Trigger point: Processing a crafted table_name argument
  • Why exploitation is possible: The value is incorporated into a quoted PRAGMA argument in a way that may allow the quote to be closed and additional SQLite statements to execute
  • Control limitation: Read-only settings or write approval mechanisms may not prevent statements injected into the database request

Why this happens

The underlying bug is improper neutralization of user-controlled input used in an SQL statement. The SQLite driver treats the table_name value as part of SQL syntax instead of strictly as data, allowing a crafted value to alter the intended PRAGMA operation and introduce stacked statements. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The underlying bug is improper neutralization of user-controlled input used in an SQL statement. The SQLite driver treats the table_name value as part of SQL syntax instead of strictly as data, allowing a crafted value to alter the intended PRAGMA operation and introduce stacked statements. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Potential impact

  • An attacker may read SQLite tables or sensitive application data
  • An attacker could modify or delete stored records
  • Database schema or metadata could be altered
  • Read-only expectations and write approval controls may be bypassed
  • Application integrity, auditability, or downstream AI-agent behavior may be affected
  • An attacker may read SQLite tables or sensitive application data
  • An attacker could modify or delete stored records
  • Database schema or metadata could be altered
  • Read-only expectations and write approval controls may be bypassed
  • Application integrity, auditability, or downstream AI-agent behavior may be affected

General mitigation guidance

Mitigation generally focuses on ensuring that database identifiers and metadata inputs cannot become executable SQL syntax.

Common defensive patterns include:

  • Use parameterized APIs or dedicated SQLite metadata interfaces wherever supported
  • Apply strict allowlists and canonical validation for table names and other identifiers
  • Avoid constructing PRAGMA statements through string interpolation
  • Separate read-only metadata operations from mutation-capable database connections
  • Enforce least-privilege database permissions and restrict write capabilities by default
  • Treat AI-agent-provided and externally sourced tool arguments as untrusted
  • Apply independent authorization and transaction controls rather than relying only on approval prompts

Mitigation generally focuses on ensuring that database identifiers and metadata inputs cannot become executable SQL syntax.

Common defensive patterns include:

  • Use parameterized APIs or dedicated SQLite metadata interfaces wherever supported
  • Apply strict allowlists and canonical validation for table names and other identifiers
  • Avoid constructing PRAGMA statements through string interpolation
  • Separate read-only metadata operations from mutation-capable database connections
  • Enforce least-privilege database permissions and restrict write capabilities by default
  • Treat AI-agent-provided and externally sourced tool arguments as untrusted
  • Apply independent authorization and transaction controls rather than relying only on approval prompts

How teams detect issues like this

Detection approaches may include:

  • Static analysis for SQL strings built through concatenation, interpolation, or formatting with tool arguments
  • Code review checks for unvalidated identifiers used in PRAGMA statements or other metadata queries
  • Runtime logging of rejected identifier values, unexpected statement counts, and database mutations during metadata operations
  • Policy enforcement requiring parameterized database access and approved identifier-validation helpers
  • Integration tests that verify metadata tools cannot execute multiple statements or perform writes

Automated security review tools can help identify unsafe SQL construction patterns, but findings should be validated against the actual database API and authorization model.

Detection approaches may include:

  • Static analysis for SQL strings built through concatenation, interpolation, or formatting with tool arguments
  • Code review checks for unvalidated identifiers used in PRAGMA statements or other metadata queries
  • Runtime logging of rejected identifier values, unexpected statement counts, and database mutations during metadata operations
  • Policy enforcement requiring parameterized database access and approved identifier-validation helpers
  • Integration tests that verify metadata tools cannot execute multiple statements or perform writes

Automated security review tools can help identify unsafe SQL construction patterns, but findings should be validated against the actual database API and authorization model.

Sources

SourceLink
github.comgithub.com/TabularisDB/tabularis
github.comgithub.com/TabularisDB/tabularis/blob/804c4c3bb6fd8eaa2e36cbe49f6c0d58f373b5e9/src-tauri/src/drivers/sqlite/mod.rs#L92-L105
github.comgithub.com/TabularisDB/tabularis/commit/fd1bdbbae35e5367c32d1e7fe9c44cb1b6875d74
github.comgithub.com/TabularisDB/tabularis/releases/tag/v0.28.0
github.comgithub.com/TabularisDB/tabularis/security/advisories/GHSA-xrx3-j98v-67x9
vulncheck.comvulncheck.com/advisories/tabularis-before-0.28.0-sql-injection-via-mcp-describe-table-table-name

Frequently asked

questions

Exploitability depends on how the MCP server is exposed. Any remote or local client that can invoke the affected tool and supply its arguments may be able to reach the vulnerable code path.

It requires whatever access is needed to call the describe_table tool. Authentication, authorization, and whether AI agents can relay untrusted content determine the practical scope.

Ensure that table names are validated as identifiers and cannot alter SQL syntax, while using parameterized or dedicated metadata APIs instead of interpolated PRAGMA statements.

Treat all tool arguments as untrusted, enforce least-privilege database access, test that metadata operations cannot execute stacked statements, and use code review or automated analysis to detect unsafe SQL construction.

Exploitability depends on how the MCP server is exposed. Any remote or local client that can invoke the affected tool and supply its arguments may be able to reach the vulnerable code path.

It requires whatever access is needed to call the describe_table tool. Authentication, authorization, and whether AI agents can relay untrusted content determine the practical scope.

Ensure that table names are validated as identifiers and cannot alter SQL syntax, while using parameterized or dedicated metadata APIs instead of interpolated PRAGMA statements.

Treat all tool arguments as untrusted, enforce least-privilege database access, test that metadata operations cannot execute stacked statements, and use code review or automated analysis to detect unsafe SQL construction.

Find out what's already
exploitable in your codebase.