Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with database-level SurrealDB credentials
-
DeliveryIssue DEFINE ANALYZER statement with arbitrary server file path
-
ExploitServer-side path traversal reads target TSV file
-
ExecutionQuery analyzer to surface file contents
-
ImpactExfiltrate two-column TSV data via query response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated session in SurrealDB with root, namespace, or database-level privileges - unauthenticated access cannot trigger this vulnerability (PR:L in CVSS). The attacker must be able to execute SurrealQL DDL statements, specifically DEFINE ANALYZER with a file path parameter. The critical limiting constraint is that only files formatted as tab-separated values with exactly two columns can be exfiltrated; files in any other format (JSON, binary, single-column, multi-column) are not readable through this vector. The CVSS 4.0 AT:P metric captures this specific attack prerequisite. Additional limiting factors: the attacker must have network access to a SurrealDB endpoint and must either know or enumerate the paths of sensitive TSV-formatted files on the server filesystem. |
| Impact | Real-world risk is low. The CVSS 4.0 score of 2.3 is consistent with the cure53 independent Low severity rating and is well-supported by the available signals. The AT:P metric in the 4.0 vector acknowledges that exploitation depends on a specific prerequisite - the target file must be tab-separated with exactly two columns - which substantially limits the universe of files that can be exfiltrated. The PR:L metric confirms that unauthenticated exploitation is not possible; attackers must possess root, namespace, or database-level credentials. No EPSS data was provided, but the absence of a KEV listing and no identified public POC reinforce a low exploitation probability. The VC:L impact rating is appropriate: partial, format-constrained file reads do not constitute full filesystem disclosure. There is no integrity or availability impact. The primary real-world scenario of concern is a multi-tenant SurrealDB deployment where untrusted but authenticated users exist - in single-tenant or fully trusted environments the practical risk approaches negligible. No conflicts between CVSS vector and description were identified; the assigned metrics accurately reflect the described behavior. |
| Exploit ScenarioDerived | An attacker authenticated to SurrealDB with at least database-level credentials issues a DEFINE ANALYZER statement referencing a known server-side file path (e.g., a service account credential file or configuration file) that happens to be in two-column tab-separated format. By querying the analyzer, the attacker reads and exfiltrates the file contents back through the database query interface. No public POC has been identified, and the attacker must have prior knowledge or conduct trial-and-error to locate TSV-formatted sensitive files. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 18, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in cargo
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Surrealdb gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
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
Lifecycle Timeline
1DescriptionCVE.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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica
SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed
Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act
Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo
SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow
Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an
Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read
SurrealDB releases before 4.0.0 fail to check query capability inside the embedded JavaScript bridge, so a low-privilege
SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete
Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a
Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web
EUVD-2025-210485
GHSA-627h-wprw-6cpg
NVD
CVE.org
EPSS
VulDB
Exploit-DB