If you're running the MCP SQLite server in production, update immediately once this PR is merged. The vulnerability allows arbitrary SQL execution through crafted tool inputs.
Two tools in the MCP SQLite server were vulnerable to SQL injection attacks:
describe_table — accepts a table name parameter that was concatenated directly into SQLquery — while designed for read-only queries, lacked sufficient input sanitizationAn attacker with access to the MCP server (or able to manipulate tool inputs through prompt injection) could execute arbitrary SQL against the connected database.
// Malicious describe_table input
{
"table_name": "users; DROP TABLE users; --"
}
// This would generate:
// SELECT * FROM sqlite_master WHERE name = 'users; DROP TABLE users; --'
// Depending on implementation, the injection could escape the quoted context
The PR implements proper parameterized queries and input validation:
// Before (vulnerable)
const sql = `SELECT * FROM sqlite_master WHERE name = '${tableName}'`;
// After (safe)
const sql = `SELECT * FROM sqlite_master WHERE name = ?`;
db.prepare(sql).get(tableName);
Key changes:
MCP servers are increasingly being used in production environments where they handle sensitive data. The SQLite server is particularly common because it provides:
As MCP adoption grows, security researchers are correctly scrutinizing the reference implementations. This is the healthy maturation of the ecosystem — vulnerabilities are being found and fixed before widespread exploitation.
This fix continues the security hardening trend in MCP servers:
If you're building MCP servers that interact with databases:
The PR is currently open and under review. Given the security nature, expect fast-track merging. Users should monitor the MCP servers releases for the fix.
This fix is a good reminder that MCP servers, like any software handling untrusted input, need security-first implementation practices. The reference servers are improving, but custom implementations should be audited with the same rigor.