CVE-2025-71392 Details
Description
SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 fails to properly escape table and field names in the command-line export command. An authenticated System User with OWNER or EDITOR roles can create tables or fields with malicious names containing SurrealQL. When a higher-privileged user subsequently imports the exported backup, the injected SurrealQL executes, enabling privilege escalation and root-level takeover of the SurrealDB instance. Applications that let users define custom tables or fields are also exposed to a universal second-order SurrealQL injection even when query parameters are sanitized.
A SurrealQL injection vulnerability has been identified in SurrealDB versions prior to 2.0.5, 2.1.5, and 2.2.2. The issue arises because the command-line export feature does not properly sanitize table and field names. An authenticated System User with OWNER or EDITOR roles can create tables or fields with malicious names that include SurrealQL. When a higher-privileged user imports the exported backup, the injected SurrealQL is executed, leading to privilege escalation and a complete takeover of the SurrealDB instance. Additionally, applications that allow users to define custom tables or fields are vulnerable to a second-order SurrealQL injection, even if query parameters are sanitized.
Users can upgrade to SurrealDB versions 2.2.2, 2.1.5, or 2.0.5 to address this vulnerability. For those unable to upgrade, it is recommended to manually inspect exported data for injected SurrealQL statements before importing.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 21, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42 | [email protected] | Vendor Advisory |
| https://www.vulncheck.com/advisories/surrealdb-before-surrealql-injection-via-export | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-77 | Improper Neutralization of Special Elements used in a Command ('Command Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| surrealdb surrealdb | < 2.0.5 >= 2.1.0, < 2.1.5 >= 2.2.0, < 2.2.2 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 29, 2026 | CVE Modified | [email protected] |
| Sep 29, 2026 | CVE Translated | [email protected] |
| Aug 13, 2026 | Initial Analysis | [email protected] |
| Jul 21, 2026 | CVE Modified | CISA-ADP |
| Jul 18, 2026 | New CVE Received | [email protected] |