---
title: "CVE-2025-71392: SurrealDB server-takeover via SurrealQL injection on backup import"
url: https://erroneo.us/security/cve/CVE-2025-71392/
description: "CVE-2025-71392 (surrealdb (crates.io (Rust))): 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…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-07-18
date_modified: 2026-10-08
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2025-71392"
kev: false
cvss: 9.4
epss: 0.00442
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2025-71392: SurrealDB server-takeover via SurrealQL injection on backup import

**Signal:** Critical, preconditions apply. Severe if exploited, but exploitation needs conditions that may not apply to you. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.4% , percentile 37: FIRST’s model estimates a 0.4% chance of exploitation activity in the next 30 days, higher than 37% of all scored CVEs (low). EPSS is a probability, not a verdict.
- Needs an account (low (any account)). Exposure depends on who can log in.
- Only applies if your dependency tree includes surrealdb (crates.io (Rust)) >= 2.2.0, < 2.2.2, fixed in 2.2.2 ; surrealdb (crates.io (Rust)) >= 2.1.0, < 2.1.5, fixed in 2.1.5 ; surrealdb (crates.io (Rust)) < 2.0.5, fixed in 2.0.5 . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- crates.io (Rust) `surrealdb` >= 2.2.0, < 2.2.2 → fixed: 2.2.2
- crates.io (Rust) `surrealdb` >= 2.1.0, < 2.1.5 → fixed: 2.1.5
- crates.io (Rust) `surrealdb` < 2.0.5 → fixed: 2.0.5

## Affected products (CVE record)

- surrealdb surrealdb: < 2.2.2
- surrealdb surrealdb: < 2.1.5
- surrealdb surrealdb: < 2.0.5

## Severity

- VulnCheck CVSS 4.0: 9.4 `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`
- GitHub CVSS 4.0: 9.4 `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`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.44% probability of exploitation activity in the next 30 days; percentile 37.

## Sources

- [GitHub Security Advisory (GHSA-ccj3-5p93-8p42)](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42)
- [GitHub Advisory GHSA-ccj3-5p93-8p42](https://github.com/advisories/GHSA-ccj3-5p93-8p42)
- [CVE.org record CVE-2025-71392](https://www.cve.org/CVERecord?id=CVE-2025-71392)
- [NVD entry CVE-2025-71392](https://nvd.nist.gov/vuln/detail/CVE-2025-71392)
- [VulnCheck Advisory: SurrealDB before 2.2.2 SurrealQL Injection via export](https://www.vulncheck.com/advisories/surrealdb-before-surrealql-injection-via-export)

---
Source page: https://erroneo.us/security/cve/CVE-2025-71392/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
