Skip to main content

SurrealDB CVE-2026-134293

| EUVDEUVD-2026-132236 HIGH
SQL Injection (CWE-89)
2026-11-21 VulnCheck GHSA-c88v-jgq3-49rc
8.8
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach SurrealDB MCP server endpoint
  2. Delivery
    Craft MCP tool argument with escaped backtick
  3. Exploit
    Break out of quoted identifier
  4. Execution
    Inject arbitrary SurrealQL statement
  5. Persist
    Execute queries bypassing tool constraints
  6. Impact
    Exfiltrate 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 (\); the MCP validator closes the identifier at the first backtick while the SurrealQL parser treats \ as a literal, enabling breakout into raw statement execution. Limiting factors: the MCP server feature must be enabled and reachable, and in practice tool arguments are often supplied through an LLM agent, so a realistic attacker needs a path to influence those arguments (e.g., prompt injection) rather than a directly exposed API. Installations not using the MCP integration are unaffected.

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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

surrealdb 3.1.0 <4.0.0

Affected Packages

euvd surrealdb fix: 4.0.0

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

Vendor (VulnCheck) PRIMARY 8.8 HIGH
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
vuln.today AI 9.1 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 21, 2026 - 18:02 EUVD
CVE Published
Nov 21, 2026 - 16:35 cve.org
HIGH 8.8

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Low
newer multi-model database; vulnerable MCP server is an optional, not-yet-widespread feature
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-71392 CRITICAL
9.4 Jul 18

Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica

CVE-2026-134292 CRITICAL
9.3 Nov 21

SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed

CVE-2026-63756 CRITICAL
9.2 Jul 20

Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act

CVE-2026-121417 HIGH
8.8 Nov 03

Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a

CVE-2026-63760 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web

CVE-2026-63747 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi

CVE-2026-63757 HIGH
8.7 Jul 20

Session hijacking in SurrealDB before 3.1.0 lets unauthenticated attackers enumerate attached session UUIDs through the

CVE-2026-134291 HIGH
8.7 Nov 21

Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read

CVE-2026-134294 HIGH
8.7 Nov 21

Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0

CVE-2026-134295 HIGH
8.7 Nov 21

Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an

CVE-2026-134299 HIGH
8.7 Nov 21

Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo

CVE-2026-134309 HIGH
8.7 Nov 21

SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy