Vulnerability  ·  2026-11-22

SurrealDB MCP server SQL injection via escaped-backtick identifier validation

VulnerabilityHigh impactGlobalCVE-2026-134293
A discrepancy between the MCP identifier validator and the SurrealQL lexer allows delimiter escape. MCP tool arguments are interpolated into SQL, and passing an identifier with an escaped backtick escapes the quoted identifier, permitting statement injection through MCP tool invocation and bypassing the tool's argument constraints.
An agent driving a SurrealDB MCP server can be steered — via a crafted tool argument or injected tool output — to execute arbitrary SQL, exfiltrating or tampering with the database beyond what the tool contract allows.
The MCP tool identifier validator (consume_backtick_ident / validate_identifier) treats the first backtick as the closing identifier delimiter and ignores escape characters that the SurrealQL lexer honours. A crafted identifier containing an escaped backtick breaks out of the quoted identifier into raw SurrealQL statement execution, so a tool call with a malicious argument injects arbitrary SQL.
SurrealDB (surrealdb) MCP server integration — versions 3.1.0 before 4.0.0
Fix committed that makes MCP identifier parsing reject escaped-backtick breakout; version 4.0.0 and later are not affected. Advisory GHSA-cr79-9p8r-p5wx.
SurrealDB GitHub advisory GHSA-cr79-9p8r-p5wxNVD CVE-2026-134293
See this in the live feed Explore related AI security and governance findings — updated every morning.
Open the feed →