SurrealDB 3.1.0 before 4.0.0 SQL Injection via MCP Tool Identifier Escaped Backticks
- State
- Published
- Severity
- 8.8 High
- Published
- Nov 21, 2026
- Updated
- Nov 23, 2026
- Reserved
- Nov 20, 2026
Description
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.
| Product | Versions |
|---|---|
| surrealdb surrealdb | 3.1.0 to before 4.0.0 Affected4.0.0 Not Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 8.8 High | VulnCheck | |
| 3.1 | 8.2 High | VulnCheck |
Weaknesses
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.