Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach SurrealDB MCP server endpoint
-
DeliveryCraft MCP tool argument with escaped backtick
-
ExploitBreak out of quoted identifier
-
ExecutionInject arbitrary SurrealQL statement
-
PersistExecute queries bypassing tool constraints
-
ImpactExfiltrate or alter database data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target run SurrealDB's optional Model Context Protocol (MCP) server integration (vulnerable code in surrealdb/mcp/src/tools/mod.rs - consume_backtick_ident and validate_identifier) on an affected version (3.1.0 up to, but not including, 4.0.0), and that the attacker be able to supply MCP tool arguments. The concrete trigger is an identifier value containing an escaped backtick (\ |
| Impact | This is a credible near-term priority, though not a drop-everything emergency. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes a network-reachable, low-complexity flaw with high confidentiality impact, and the vuln.today decision label is 'this_week' rather than act_now or emergency. It is NOT in CISA KEV and the input provides no EPSS score, so there is no evidence of active or widespread exploitation - exploitation status is best described as no public exploit identified at time of analysis. The practical risk is tightly bounded by exposure: the vulnerable code path lives only in SurrealDB's optional MCP server integration, so an environment must actually run that integration and let an attacker influence MCP tool arguments. The PR:N rating assumes unauthenticated reachability of the MCP endpoint; in realistic deployments the 'attacker' is often an LLM agent coerced via prompt injection into passing a crafted identifier, which is a real but more constrained delivery path than the raw vector implies. Net: a genuine high-severity injection worth patching this week where the MCP server is deployed, but of little relevance to the large majority of SurrealDB installs that do not expose it. |
| Exploit ScenarioDerived | An attacker who can submit MCP tool arguments to a SurrealDB MCP server supplies an identifier containing an escaped backtick (\`). Because the MCP validator treats the first backtick as the closing delimiter while the SurrealQL parser honors the escape, the value breaks out of the quoted identifier and is executed as raw SurrealQL, letting the attacker run arbitrary database statements and bypass the tool's intended argument constraints. No public, verified exploit code is identified in the provided sources, though a vendor advisory (VulnCheck) and the GitHub Security Advisory document the mechanism in detail. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 21, 2026
SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allows an attacker who can supply MCP tool arguments to break out of a quoted identifier and execute arbitrary SurrealQL statements, giving high confidentiality and integrity impact. Exploitation requires the optional MCP server integration to be enabled, reachable, and fed attacker-influenced tool arguments - in typical deployments those arguments are produced by an LLM agent, so a realistic path involves influencing the agent's input (for example via prompt injection) rather than hitting a directly exposed API. Installations that do not use the MCP integration are not affected; the vulnerability is rated 8.8 (CVSS 3.1, AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N) and no public exploit code was identified at time of analysis. Vendor-released patch: 4.0.0, with the upstream fix in commit ec41ae8f15.
RemediationAI
Upgrade SurrealDB to 4.0.0 or later, the first release that is not affected; the upstream fix is commit ec41ae8f15 ('fix(mcp): MCP tool identifier validation permits statement injection via escaped backticks'), referenced from advisory GHSA-cr79-9p8r-p5wx. If upgrading cannot happen immediately, the most direct compensating control is to disable the optional MCP server integration or restrict network access to the MCP endpoint to trusted agent infrastructure only - the trade-off is loss of the agent/tool functionality, and any still-reachable endpoint remains exploitable. Because MCP tool arguments are normally produced by an LLM agent, also constrain and review what can influence those arguments (for example untrusted content fed into the agent's context) and avoid exposing the MCP server to untrusted inputs; this reduces but does not eliminate the risk while the vulnerable string-interpolated identifier handling remains in place. Once on 4.0.0 or later, no further action is required for this issue.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SurrealDB's MCP server exposes CRUD-style tools to AI agents, and in surrealdb/mcp/src/tools/mod.rs it builds SurrealQL statements by interpolating tool arguments into quoted identifiers. Two functions, consume_backtick_ident and validate_identifier, treat the first backtick they encounter as the closing delimiter and ignore a preceding backslash escape, whereas the core SurrealQL lexer honours \` as a literal backtick inside an identifier. Supplying an identifier containing an escaped backtick therefore desynchronises the validator from the parser: the validator believes the identifier has ended while the parser keeps consuming, letting the remainder of the value land as raw SurrealQL and yielding statement injection (CWE-89). The root cause is a parsing-consistency failure rather than a missing database permission - the fix in commit ec41ae8f15 validates MCP tool identifiers so an escaped backtick can no longer break out, and the advisory recommends either synchronising MCP identifier parsing with the core SurrealQL lexer or constructing queries from parameterised AST nodes instead of string interpolation. CPE data maps the affected component to cpe:2.3:a:surrealdb:surrealdb with the vulnerable range below 4.0.0; the flaw lives only in the MCP integration, so the database core itself is not implicated.
Know when Surrealdb gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Network-reachable MCP tool input with low complexity and no confirmed auth in the vector (PR:N); escaped-backtick breakout yields arbitrary SurrealQL read and write, so C:H/I:H, with no clear availability impact described.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
SurrealDB 3.1.0 before 4.0.0 contains an SQL injection vulnerability in its Model Context Protocol (MCP) server because the identifier validator (consume_backtick_ident and validate_identifier) treats the first backtick as the closing delimiter, ignoring escape characters that the SurrealQL parser honors. Attackers can supply MCP tool arguments containing an escaped backtick to break out of the quoted identifier and execute arbitrary SurrealQL statements.
Technical POC Analysis
CWE-89 (SQL injection), specifically a validator/lexer parser differential.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
SurrealDB's optional MCP server integration (versions 3.1.0 through 3.x) contains a SQL injection flaw allowing attackers who can shape tool arguments-typically via LLM prompt injection-to execute arbitrary database statements, compromising data confidentiality and integrity. Organizations running SurrealDB with MCP enabled face high risk until upgraded to version 4.0.0.
Apply vendor patch: 4.0.0. If immediate upgrade is not possible, disable the MCP server integration until patched; if it must remain enabled, restrict network access to trusted sources and monitor for suspicious SurrealQL statements.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica
SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed
Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act
Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi
Session hijacking in SurrealDB before 3.1.0 lets unauthenticated attackers enumerate attached session UUIDs through the
Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read
Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0
Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an
Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo
SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete
EUVD-2026-132236
GHSA-c88v-jgq3-49rc
NVD
CVE.org
EPSS
Exploit-DB