Duplicate Advisory: SurrealDB server-takeover via SurrealQL injection on backup import
Description
SurrealDB versions before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 contain a SurrealQL injection vulnerability in the command-line export command. Authenticated users with OWNER or EDITOR roles can create malicious table or field names that inject SurrealQL code. When a higher-privileged user imports the backup, this injected code executes, allowing privilege escalation and root-level takeover of the SurrealDB instance. Applications permitting user-defined tables or fields are vulnerable to a universal second-order SurrealQL injection, even if query parameters are sanitized.
CVSS v4.0
Affected software
pkg:github/surrealdb/surrealdbRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
SurrealDB before versions 2.0.5, 2.1.5, and 2.2.2 fails to properly escape table and field names in the command-line export command. This allows an authenticated System User with OWNER or EDITOR roles to embed malicious SurrealQL code in table or field names. Upon import of the backup by a higher-privileged user, the injected SurrealQL executes, enabling privilege escalation and root-level takeover of the database instance. This vulnerability also exposes applications that allow user-defined tables or fields to a universal second-order SurrealQL injection, bypassing query parameter sanitization.
Potential Impact
An attacker with OWNER or EDITOR roles can escalate privileges to root level by injecting malicious SurrealQL commands via crafted table or field names in backups. This leads to full server takeover of the SurrealDB instance. The vulnerability affects the integrity and confidentiality of the database and can compromise all stored data and operations.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade SurrealDB to versions 2.0.5 or later, 2.1.5 or later, and 2.2.2 or later to remediate this issue. Applying these official fixes will prevent SurrealQL injection via backup import. No additional mitigation steps are required if the patch is applied.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-h5q3-3v5q-v5j8
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-71392"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 4.0
Threat ID: 6a5ba17e44ab8fbf7c789b97
Added to database: 07/18/2026, 15:53:34 UTC
Last enriched: 09/12/2026, 11:02:26 UTC
Last updated: 10/13/2026, 18:48:16 UTC
Views: 143
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.