Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/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
Network-accessible via SurrealDB endpoint, PR:L for required database-level authentication, C:L reflecting format-constrained partial file disclosure with no integrity or availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/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
Lifecycle Timeline
3DescriptionCVE.org
SurrealDB versions before 2.2.2 contain a local file read vulnerability in the DEFINE ANALYZER statement that allows authenticated users to read arbitrary files on the file system. Attackers with root, namespace, or database level privileges can point analyzers to arbitrary file paths and exfiltrate content from two-column tab-separated files.
AnalysisAI
Local file read via DEFINE ANALYZER in SurrealDB before versions 2.1.5 and 2.2.2 allows authenticated users holding root, namespace, or database-level privileges to point analyzer mappings at arbitrary server-side file paths, leaking file contents constrained to two-column tab-separated format. Discovered and rated Low severity during a cure53 code audit and penetration test, the flaw is a CWE-22 path traversal with no KEV listing and no public exploit identified at time of analysis. The vendor has released patches for both the 2.1.x and 2.2.x branches and introduced a SURREAL_FILE_ALLOWLIST environment variable to restrict permissible file paths.
Technical ContextAI
SurrealDB is a multi-model database written in Rust that exposes SurrealQL DDL statements including DEFINE ANALYZER, which supports external mapping files for text analysis pipelines. The vulnerability is rooted in CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - Path Traversal): the analyzer statement accepts a file path parameter without validating or restricting it to a safe directory boundary, allowing traversal to arbitrary locations on the server filesystem. Affected CPE is cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:* covering versions prior to 2.1.5 and versions 2.2.0 through 2.2.1. The CVSS 4.0 vector AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N reflects a network-reachable path with low attack complexity but an attack-specific prerequisite (AT:P) tied to the two-column TSV file format constraint. The upstream fix in pull request #5600 introduces SURREAL_FILE_ALLOWLIST, an environment variable operators populate with explicitly permitted file paths checked at mapping-file processing time.
RemediationAI
Vendor-released patches are available: upgrade to SurrealDB 2.1.5 (2.1.x branch) or SurrealDB 2.2.2 (2.2.x branch), both confirmed fixed per GHSA-2cvj-g5r5-jrrg and upstream pull request #5600 at https://github.com/surrealdb/surrealdb/pull/5600. After upgrading, operators should configure the new SURREAL_FILE_ALLOWLIST environment variable to an explicit list of permitted file paths; leaving it unconfigured may not fully restrict access in all deployment scenarios, so reviewing the SurrealQL DEFINE ANALYZER documentation at https://surrealdb.com/docs/surrealql/statements/define/analyzer is advised. For users unable to update immediately, the vendor-recommended compensating control is to restrict root, namespace, and database-level accounts exclusively to fully trusted personnel; this does not eliminate the path traversal flaw but removes the privilege prerequisite required for exploitation. Note that this access restriction may have operational trade-offs in environments where broader user provisioning is required.
Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica
Denial of service in SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 lets an authenticated user with
Denial of service in SurrealDB before 2.2.2 allows any authenticated user to crash the database by submitting a crafted
Denial of service in SurrealDB before 2.2.2 lets an authenticated user crash the database by calling the string::replace
Memory exhaustion in SurrealDB's scripting subsystem allows authenticated users to bypass the server's recursion depth l
Server-side request forgery in SurrealDB before versions 2.0.5, 2.1.5, and 2.2.2 allows authenticated users to circumven
DNS rebinding SSRF bypass in SurrealDB's http::* query functions allows authenticated low-privileged users to reach inte
SurrealDB versions 3.0.0 through 3.1.4 expose a query-planner authorization bypass that allows authenticated record user
Resource exhaustion in SurrealDB's embedded JavaScript scripting feature allows authenticated users to deny service by s
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2025-210485
GHSA-627h-wprw-6cpg