Friday, 4 December 2026
4 agent hacks today▼ 3 vs yesterday (7)

SQL comment trick defeats read-only guard in GreptimeDB MCP server

A flaw tracked as CVE-2026-144452 let write statements slip past the tool's security gate, with prompt injection named as a route in.

By The Agentic Times ·

A guard standing at a gate watches water flow through a pipe labeled "read," unaware that a hidden channel beneath carries a parallel stream marked "write" directly past him.
A guard standing at a gate watches water flow through a pipe labeled "read," unaware that a hidden channel beneath carries a parallel stream marked "write" directly past him. · Illustration: The Agentic Times

A read-only safeguard in the GreptimeDB MCP server could be bypassed by hiding write statements behind comment markers inside SQL string literals, according to an entry published by the US National Vulnerability Database on 4 December 2026. The flaw is tracked as CVE-2026-144452 and affects versions of greptimedb-mcp-server, maintained by GreptimeTeam, before 0.6.2.

The component at fault is called security_gate. It is the check that is supposed to stop an AI model from issuing anything other than read queries against the database. According to the NVD entry, attackers could run write statements by placing them behind comment markers within SQL strings, which the gate failed to interpret correctly. That allowed INSERT, DELETE or DROP statements to be stacked onto a query and passed through the server's execute_sql tool, which the NVD describes as a route to modifying or destroying data.

The NVD entry specifically names prompt injection as a way in. Prompt injection is the technique of smuggling instructions into text that an AI model reads, so the model follows the attacker's wording rather than the operator's. In this case the attacker does not need direct database access. Anyone able to influence the SQL that the model generates could, according to the advisory, get a write statement past the gate.

MCP servers sit between an AI assistant and an external system, exposing a set of tools the model can call. Read-only mode is the standard mitigation operators rely on when they connect a model to a production datastore: the assistant can query, but it is not meant to be able to change anything. A bypass of that mode removes the main line of defence between an untrusted prompt and live data.

GreptimeTeam has published a fix. The references attached to the CVE record point to release v0.6.2 on GitHub, a pull request numbered 57, and a specific commit addressing the issue, alongside a security advisory carrying the identifier GHSA-v2wh-92mj-qxq7. The NVD references also include a link to the vulnerable code in utils.py as it stood in version 0.6.1, covering lines 21 to 75, which is where the gate logic sat. A separate advisory from VulnCheck describing the same issue is listed as a reference.

The record does not state whether the flaw was exploited against any live deployment. No affected users have been named, and the advisory gives no indication of how the issue was found or by whom beyond the published references.

For operators, the practical step is to check which version of greptimedb-mcp-server is running and move to 0.6.2 or later. The pattern is worth noting more broadly. Guardrails that work by inspecting a string before passing it on are only as good as their parser, and SQL comment syntax is a well-trodden way to make text look harmless to a filter while still reaching the engine behind it. Where a model generates the query and an outsider can shape the model's input, a parsing weakness in the filter becomes an attacker-controlled write path.

Sources

  1. nvd.nist.govhttps://nvd.nist.gov/vuln/detail/CVE-2026-144452