Skip to main content

SurrealDB CVE-2025-71394

| EUVDEUVD-2025-210485 LOW
Path Traversal (CWE-22)
2026-07-18 VulnCheck GHSA-627h-wprw-6cpg
2.3
CVSS 4.0 · Vendor: VulnCheck

Severity by source

Vendor (VulnCheck) PRIMARY
2.3 LOW
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
vuln.today AI
4.3 MEDIUM

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

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
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
X

Lifecycle Timeline

3
Patch available
Jul 18, 2026 - 15:17 EUVD
Source Code Evidence Fetched
Jul 18, 2026 - 14:10 vuln.today
Analysis Generated
Jul 18, 2026 - 14:10 vuln.today

DescriptionCVE.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.

Share

CVE-2025-71394 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy