Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

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. (CVE-2025-71392)

0
Critical
Published: 07/18/2026 (07/18/2026, 15:31:49 UTC)
Source: GCVE Database

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.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
High
Subsq. Integrity
High
Subsq. Availability
High
Scope
X
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Affected software

GitHub Actionsmore threats →ai
surrealdb/surrealdb
pkg:github/surrealdb/surrealdb
Affected versions
<2.0.5>=2.1.0 <2.1.5>=2.2.0 <2.2.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/18/2026, 16:22:16 UTC

Technical Analysis

SurrealDB before versions 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 injection payloads. When a higher-privileged user imports the exported backup, the injected SurrealQL executes, resulting in privilege escalation and root-level takeover of the SurrealDB instance. This vulnerability also allows universal second-order SurrealQL injection in applications that permit user-defined tables or fields, even if query parameters are sanitized. The vulnerability is tracked as CVE-2025-71392 and classified under CWE-77 (Improper Neutralization of Special Elements used in a Command).

Potential Impact

Successful exploitation allows an authenticated user with OWNER or EDITOR roles to escalate privileges to root-level access on the SurrealDB instance by injecting malicious SurrealQL commands through table or field names. This can lead to complete compromise of the database and potentially the underlying system. The vulnerability also affects applications that allow user-defined tables or fields, exposing them to second-order injection attacks despite query parameter sanitization.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict OWNER and EDITOR role assignments to trusted users only and avoid importing backups from untrusted sources. Monitor vendor communications for patches addressing this issue.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-h5q3-3v5q-v5j8
Osv Schema Version
1.4.0
Aliases
["CVE-2025-71392"]
Ecosystems
[]
Database Specific Severity
CRITICAL
Cvss Version
4.0

Threat ID: 6a5ba17e44ab8fbf7c789b97

Added to database: 07/18/2026, 15:53:34 UTC

Last enriched: 07/18/2026, 16:22:16 UTC

Last updated: 07/18/2026, 19:37:15 UTC

Views: 14

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses