News · SurrealDB · 2 min read
Event date: · Published:
SurrealDB fixes SQL injection flaw in its MCP server and CLI credential leak
SurrealDB disclosed two advisories on November 21, 2026: a high-severity SQL injection reachable through MCP tool arguments, and a moderate bug that prints database credentials in CLI help output.
SurrealDB disclosed two security advisories on November 21, 2026, detailing a high-severity SQL injection reachable through its Model Context Protocol (MCP) server and a moderate credential-disclosure bug in its command-line interface, as described in the SurrealDB SQL injection via Model Context Protocol server advisory.
What changed
- GHSA-c88v-jgq3-49rc (CVE-2026-134293): High severity, CVSS score of 8.8, published November 21, 2026, affecting SurrealDB versions 3.1.0 up to before 4.0.0.
- The identifier validator treats the first backtick as the closing delimiter and ignores escape characters that the SurrealQL parser honors, letting MCP tool arguments containing an escaped backtick break out of a quoted identifier.
- The flaw lets attackers execute arbitrary SurrealQL statements over the network, with no authentication or user interaction required.
- [GHSA-77xq-pgc2-9j9g](https://github.com/advisories/GHSA-77xq-pgc2-9j9g) (CVE-2026-134289): Moderate severity, CVSS score of 4.1, published November 21, 2026, affecting versions 1.0.0 up to before 4.0.0.
- Running
surreal start,sql,import,export, ormcpwith--helpor-hprints theSURREAL_PASSandSURREAL_TOKENenvironment variable values in clear text, risking exposure through terminal logs, CI systems, or recorded screen sessions.
What it means for AI builders
SurrealDB is used as a backend for AI agent and retrieval-augmented generation (RAG) stacks, and the SQL injection is reachable directly through MCP tool-call arguments. That means any AI agent wired to a SurrealDB MCP server could be tricked into running arbitrary database commands, without an attacker needing credentials or any action from a user.
What to do next
- Upgrade to SurrealDB version 4.0.0 or later, since versions 3.1.0 up to before 4.0.0 carry the SQL injection and versions 1.0.0 up to before 4.0.0 carry the credential-disclosure bug.
- Avoid running
surreal start,sql,import,export, ormcpwith--helpor-hin places whereSURREAL_PASSorSURREAL_TOKENoutput could be captured, such as terminal logs, CI systems, or recorded screen sessions.
Sources
- SurrealDB SQL injection via Model Context Protocol server (GitHub Security Advisories, November 21, 2026, official)
- SurrealDB prints environment variable credentials in CLI help output (GitHub Security Advisories, November 21, 2026, official)
Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.