{"id":"CVE-2025-71392","published":"2026-07-18T13:10:11Z","modified":"2026-10-29T21:15:20Z","title":"SurrealDB before 2.2.2 SurrealQL Injection via export","vendor":"surrealdb","product":"surrealdb","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.4,"severity":"CRITICAL","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00442,"percentile":0.30324,"provenance":"source"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"references":[{"url":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42","tags":["vendor-advisory"]},{"url":"https://www.vulncheck.com/advisories/surrealdb-before-surrealql-injection-via-export","tags":["third-party-advisory"]}],"priority":{"score":12.6,"factors":[{"name":"EPSS percentile","points":6.06},{"name":"CVSS severity","points":6.58}]},"vendorSlug":"surrealdb","affectedVersions":[{"vendor":"surrealdb","product":"surrealdb","versions":[">= 2.2.0, < 2.2.2"]},{"vendor":"surrealdb","product":"surrealdb","versions":[">= 2.1.0, < 2.1.5"]},{"vendor":"surrealdb","product":"surrealdb","versions":["< 2.0.5"]}],"fixedVersions":[{"vendor":"surrealdb","product":"surrealdb","versions":["2.2.2"]},{"vendor":"surrealdb","product":"surrealdb","versions":["2.1.5"]},{"vendor":"surrealdb","product":"surrealdb","versions":["2.0.5"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-07-21T02:39:28.967494Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"surrealdb","vulnerableRanges":[">=2.2.0, <2.2.2",">=2.1.0, <2.1.5","<2.0.5"],"patched":["2.2.2","2.1.5","2.0.5"],"from":["GHSA-ccj3-5p93-8p42"],"provenance":"source"}],"euvd":{"id":"EUVD-2025-210483","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-58367","published":"2026-07-18","fixed":"2.0.4","kev":false,"link":{"from":"CVE-2024-58367","to":"CVE-2025-71392","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:surrealdb","fromFixed":"2.0.4","toFixed":"2.0.5","daysApart":0}]}},{"cve":"CVE-2024-58358","published":"2026-07-18","fixed":"2.1.0","kev":false,"link":{"from":"CVE-2025-71392","to":"CVE-2024-58358","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:surrealdb","fromFixed":"2.0.5","toFixed":"2.1.0","daysApart":0}]}},{"cve":"CVE-2024-58356","published":"2026-07-18","fixed":"2.1.4","kev":false,"link":{"from":"CVE-2024-58356","to":"CVE-2025-71392","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:surrealdb","fromFixed":"2.1.4","toFixed":"2.1.5","daysApart":0}]}},{"cve":"CVE-2025-71392","published":"2026-07-18","fixed":"2.2.2","kev":false},{"cve":"CVE-2025-71398","published":"2026-07-18","fixed":"2.2.2","kev":false},{"cve":"CVE-2026-49997","published":"2026-07-15","fixed":"3.1.0","kev":false},{"cve":"CVE-2026-63743","published":"2026-07-20","fixed":"3.1.0","kev":false}],"package":"crates.io:surrealdb"}}