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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with database-level SurrealDB credentials
  2. Delivery
    Issue DEFINE ANALYZER statement with arbitrary server file path
  3. Exploit
    Server-side path traversal reads target TSV file
  4. Execution
    Query analyzer to surface file contents
  5. Impact
    Exfiltrate 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

surrealdb 0 <2.1.5
surrealdb 0 <2.2.2

Affected Packages

cargo surrealdb fix: 2.1.5, 2.2.2

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

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 18, 2026 - 15:17 EUVD

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Low
niche multi-model Rust database, limited enterprise production footprint
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

CVE-2025-71392 CRITICAL
9.4 Jul 18

Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica

CVE-2026-134292 CRITICAL
9.3 Nov 21

SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed

CVE-2026-63756 CRITICAL
9.2 Jul 20

Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act

CVE-2026-134299 HIGH
8.7 Nov 21

Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo

CVE-2026-134293 HIGH
8.8 Nov 21

SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow

CVE-2026-134295 HIGH
8.7 Nov 21

Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an

CVE-2026-134291 HIGH
8.7 Nov 21

Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read

CVE-2026-137490 HIGH
8.7 Nov 26

SurrealDB releases before 4.0.0 fail to check query capability inside the embedded JavaScript bridge, so a low-privilege

CVE-2026-134309 HIGH
8.7 Nov 21

SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete

CVE-2026-121417 HIGH
8.8 Nov 03

Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a

CVE-2026-134294 HIGH
8.7 Nov 21

Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0

CVE-2026-63760 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web

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