{"id":"GHSA-ccj3-5p93-8p42","revision":null,"records":[{"revision":"68266f9e2ae146ef9a737bac4a6982d6","observedAt":"2026-10-29T22:48:55.035+00:00","statement":{"source":"cve-program","id":"CVE-2025-71392","aliases":[],"title":"SurrealDB before 2.2.2 SurrealQL Injection via export","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.","state":0,"publishedAt":"2026-07-18T13:10:11.661+00:00","modifiedAt":"2026-10-29T21:15:20.082+00:00","affected":[{"ecosystem":"Vendor product","name":"surrealdb","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"surrealdb\",\n                    \"product\": \"surrealdb\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:cargo/surrealdb\",\n                    \"versions\": [\n                        {\n                            \"version\": \"2.2.0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"2.2.2\"\n                        },\n                        {\n                            \"version\": \"2.2.2\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"surrealdb","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"surrealdb\",\n                    \"product\": \"surrealdb\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:cargo/surrealdb\",\n                    \"versions\": [\n                        {\n                            \"version\": \"2.1.0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"2.1.5\"\n                        },\n                        {\n                            \"version\": \"2.1.5\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"surrealdb","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"surrealdb\",\n                    \"product\": \"surrealdb\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:cargo/surrealdb\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"2.0.5\"\n                        },\n                        {\n                            \"version\": \"2.0.5\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 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","score":9.4,"severity":"CRITICAL"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42","https://www.vulncheck.com/advisories/surrealdb-before-surrealql-injection-via-export"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-71392","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-71392","identifiers":["CVE-2025-71392"]},"retained":false,"historicalAffected":[]},{"revision":"18441bb1513e416788beebf22992f661","observedAt":"2026-11-05T03:02:30.277+00:00","statement":{"source":"euvd","id":"EUVD-2025-210483","aliases":["CVE-2025-71392","GHSA-h5q3-3v5q-v5j8"],"title":"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 m…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 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","score":9.4,"severity":null}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42","https://www.vulncheck.com/advisories/surrealdb-before-surrealql-injection-via-export"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-210483","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 18, 2026, 1:10:11 PM","dateUpdated":"Oct 29, 2026, 9:15:20 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2025-210483","identifiers":["EUVD-2025-210483","CVE-2025-71392","GHSA-h5q3-3v5q-v5j8"]},"retained":false,"historicalAffected":[]},{"revision":"931927bceca342e58e259bea52c4f8f7","observedAt":"2026-10-31T06:45:43.126+00:00","statement":{"source":"nvd","id":"CVE-2025-71392","aliases":[],"title":"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 m…","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.","state":0,"publishedAt":"2026-07-18T14:17:10.58+00:00","modifiedAt":"2026-10-29T21:17:05.793+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · disclosure@vulncheck.com · Secondary","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/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","score":9.4,"severity":"CRITICAL"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":8,"severity":"HIGH"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42","https://www.vulncheck.com/advisories/surrealdb-before-surrealql-injection-via-export"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-71392","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-77"],"productCriteria":["cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2026-07-18T14:17:10.580","lastModified":"2026-10-29T21:17:05.793"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2025-71392","identifiers":["CVE-2025-71392"]},"retained":false,"historicalAffected":[]},{"revision":"5b2c264438a84a33afa10ef44f5f9e5c","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-ccj3-5p93-8p42","aliases":["CVE-2025-71392"],"title":"SurrealDB server-takeover via SurrealQL injection on backup import","description":"The SurrealDB command-line tool allows exporting databases through the `export` command. It was discovered that table or field names are not properly sanitized in exports, leading to a SurrealQL injection when the backup is reimported.\n\nFor the injection to occur, an authenticated System User with `OWNER` or `EDITOR` roles needs to create tables or fields with malicious names containing SurrealQL, subsequently exported using the `export` operation\n\nThe attacker could achieve a privilege escalation and root level access to the SurrealDB instance if a higher privileged user subsequently performs the `import` operation. \n\nFurthermore, applications using SurrealDB that allow its users to define custom fields or tables are at risk of a universal second order SurrealQL injection, even if query parameters are properly sanitized. \n\nThis issue was discovered and patched during an code audit and penetration test of SurrealDB by cure53, the severity defined within cure53's preliminary finding is Critical, matched by our CVSS v4 assessment.\n\n### Impact\nThis attack can be used to perform privilege escalation and complete takeover (root access) of the SurrealDB instance, as well as being able to perform SurrealQL injection attacks against co-tenanted applications where SurrealDB is used as a shared backend for multiple applications.\n\n### Patches\nA patch has been created that addresses the issue by fixing the bugs in the exporter which failed to escape some characters properly.\n\n- Versions 2.0.5, 2.1.5, 2.2.2 and later are not affected by this issue.\n\n\n### Workarounds\nFor SurrealDB users that are unable to upgrade, users that are looking to perform `import` operations must manually inspect the exported data for injected statements, prior to importing. \n\n\n### Resources\n[SurrealDB Documentation - Export](https://surrealdb.com/docs/surrealdb/cli/export)\n[SurrealDB Documentation - Import](https://surrealdb.com/docs/surrealdb/cli/import)\n[SurrealDB Documentation - Authentication](https://surrealdb.com/docs/surrealdb/security/authentication)","state":0,"publishedAt":"2025-04-11T14:07:34+00:00","modifiedAt":"2026-09-04T19:45:06.3334106+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.2.0"},{"kind":"fixed","version":"2.2.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.1.0"},{"kind":"fixed","version":"2.1.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.0.5"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42","https://nvd.nist.gov/vuln/detail/CVE-2025-71392","https://github.com/surrealdb/surrealdb","https://www.vulncheck.com/advisories/surrealdb-before-surrealql-injection-via-export"],"sourceUrl":"https://github.com/advisories/GHSA-ccj3-5p93-8p42","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-ccj3-5p93-8p42","identifiers":["GHSA-ccj3-5p93-8p42","CVE-2025-71392"]},"retained":false,"historicalAffected":[]},{"revision":"18271693a3664c28860941d5435aea6b","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-h5q3-3v5q-v5j8","aliases":[],"title":"Duplicate Advisory: SurrealDB server-takeover via SurrealQL injection on backup import","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of\u00A0GHSA-ccj3-5p93-8p42. This link is maintained to preserve external references.\n\n## Original Description\nSurrealDB 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.","state":2,"publishedAt":"2026-07-18T15:31:49+00:00","modifiedAt":"2026-09-04T19:45:06.8520945+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"CVSS_V4","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/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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42","https://nvd.nist.gov/vuln/detail/CVE-2025-71392","https://www.vulncheck.com/advisories/surrealdb-before-surrealql-injection-via-export"],"sourceUrl":"https://github.com/advisories/GHSA-h5q3-3v5q-v5j8","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-h5q3-3v5q-v5j8","identifiers":["GHSA-h5q3-3v5q-v5j8"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-07T02:34:43.7661215+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-07T02:34:43.7661215+00:00","lastSuccessAt":"2026-11-07T02:34:43.9387828+00:00","error":null,"lastVerifiedAt":"2026-11-07T02:34:43.9387838+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-bb5c9d5a08063ef076042e33dd72a7d0ffa4c4487efdcf3106e29ba55ec2ad57-5aac302c22044f92cc2d766b3e31e7dc718ccd14d0209c666b12bbe38c20772f","complete":true,"records":420475,"lastAttemptAt":"2026-11-07T02:34:42.7079446+00:00","lastSuccessAt":"2026-11-07T02:34:42.70025+00:00","error":null,"lastVerifiedAt":"2026-11-07T02:34:42.7079446+00:00","snapshotPublishedAt":"2026-11-07T01:31:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-7a331ee100f943a6a0b84602f7d303b9","complete":false,"records":13623,"lastAttemptAt":"2026-11-07T02:39:11.030054+00:00","lastSuccessAt":"2026-11-07T02:39:11.1232787+00:00","error":null,"lastVerifiedAt":"2026-11-07T02:39:11.1232787+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-07T02:34:43.7661215+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-07T02:34:43.7661215+00:00","lastSuccessAt":"2026-11-07T02:34:43.9397262+00:00","error":null,"lastVerifiedAt":"2026-11-07T02:34:43.9397266+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-34343b4ea57e47c5a482c8fcf20a381e","complete":true,"records":13645,"lastAttemptAt":"2026-11-07T02:34:44.5754579+00:00","lastSuccessAt":"2026-11-07T01:26:55.938+00:00","error":null,"lastVerifiedAt":"2026-11-07T01:26:55.938+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-0eb4d6dde62dffacd040ad992d4fd5a65cd7d0dc5f5f4cfa8b41967fc6f9ca5f","complete":true,"records":9914,"lastAttemptAt":"2026-11-07T02:34:43.3341619+00:00","lastSuccessAt":"2026-11-06T20:10:36.6450506+00:00","error":null,"lastVerifiedAt":"2026-11-07T02:34:43.3341619+00:00","snapshotPublishedAt":"2026-11-06T20:02:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-07T02:34:42.8444254+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-07T02:34:42.8444254+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-335633e78a15c9cde10a6025895b5617717087fb945489ae7e15d377bacf34a9","complete":true,"records":3055,"lastAttemptAt":"2026-11-07T02:34:43.7181027+00:00","lastSuccessAt":"2026-11-06T16:03:00.7615789+00:00","error":null,"lastVerifiedAt":"2026-11-07T02:34:43.7181027+00:00","snapshotPublishedAt":"2026-11-06T16:02:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-a0b728bc1c5526b5429930c00621636eba8655069c176697c3080f8377619ad7","complete":true,"records":231291,"lastAttemptAt":"2026-11-07T02:34:43.2326712+00:00","lastSuccessAt":"2026-11-07T00:28:51.1983528+00:00","error":null,"lastVerifiedAt":"2026-11-07T02:34:43.2326712+00:00","snapshotPublishedAt":"2026-11-06T23:33:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}