Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain EDITOR/OWNER database credentials
-
DeliverySubmit DEFINE ANALYZER with mapper('/proc/self/environ')
-
ExploitPath traversal bypasses empty allowlist
-
ExecutionError message returns first file line
-
PersistHarvest root creds / env secrets
-
ImpactReuse to control full instance
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 SurrealDB account with the EDITOR or OWNER role and the ability to run DEFINE ANALYZER with a mapper() filter, into which the attacker supplies an arbitrary absolute file path. The vulnerable state is that SURREAL_FILE_ALLOWLIST is empty or not configured - which is the default - so out-of-the-box installations are affected without any special setup. Exploitation is LIMITED by: (1) required privilege - a lower-privilege or unauthenticated user cannot trigger it; (2) output truncation - only the first line of the target file is returned (except for files containing no newlines), so multi-line secrets beyond line one are not directly recoverable; and (3) filesystem reach - only files readable by the OS user the SurrealDB process runs as are accessible, so least-privilege process accounts and container mounts constrain the blast radius. Setting a non-empty allowlist fully neutralizes the condition on affected versions. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N, base 8.3) is internally consistent with the description: network-reachable, low complexity, requires low privileges (a legitimate EDITOR/OWNER database account, i.e. authenticated per PR:L), no user interaction, and high confidentiality impact on both the vulnerable system (VC:H) and a subsequent system (SC:H, reflecting that leaked startup credentials/env secrets can escalate toward control of the whole instance). No EPSS score was provided and the CVE is not in CISA KEV, so there is no evidence of active or widespread exploitation - treat exploitation probability as unquantified rather than confirmed-low. No POC was supplied, but the advisory's detail lowers the barrier to weaponization. Practical risk is meaningfully bounded by two factors the raw score understates: the attacker must already hold a privileged EDITOR/OWNER role, and only the first line of any file is disclosed - which nonetheless suffices to read /proc/self/cmdline or /proc/self/environ and recover --user/--pass or secret env vars. Net: a real, prioritize-if-you-run-multi-tenant-SurrealDB issue rather than an internet-wide unauthenticated risk. |
| Exploit ScenarioDerived | An attacker who holds (or compromises) a SurrealDB account with the EDITOR or OWNER role issues a DEFINE ANALYZER statement whose mapper() filter points at /proc/self/environ or /proc/self/cmdline. The resulting parse error returns the first line of that file, disclosing the process's startup root credentials or secret environment variables, which the attacker reuses to take over the instance. No POC is publicly identified, but the attack is low-complexity and network-reachable given a valid privileged account. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 20, 2026
Arbitrary file read in SurrealDB before 3.1.5 lets an authenticated database user holding the EDITOR or OWNER role disclose files readable by the SurrealDB process by pointing the DEFINE ANALYZER mapper() filter at an arbitrary path and harvesting the content from query error messages. The flaw is exploitable in default deployments because the SURREAL_FILE_ALLOWLIST is empty by default and an empty allowlist enforced no restriction. There is no public exploit identified at time of analysis and it is not on CISA KEV, but the GHSA advisory documents the technique in enough detail to reproduce.
RemediationAI
Vendor-released patch: upgrade to SurrealDB 3.1.5, in which check_is_path_allowed denies every path when no SURREAL_FILE_ALLOWLIST is configured (secure by default) and analyzer parse errors no longer include mapped-file contents, only the line number; the fix landed via https://github.com/surrealdb/surrealdb/pull/5600. If you cannot upgrade immediately, set SURREAL_FILE_ALLOWLIST to a directory containing only the intended mapping files - note that on affected versions the allowlist MUST be non-empty to have any effect, and this confines the mapper filter to that directory at the cost of blocking legitimate mapping files stored elsewhere. Additionally, grant EDITOR and OWNER database roles only to trusted principals to shrink the pool of potential abusers, and stop supplying secrets (especially root --user/--pass) on the command line or via environment variables - prefer mounted files with least-privilege permissions so a successful read yields less, though this changes your credential-provisioning workflow. See advisory GHSA-cc8f-fcx3-gpjr and the SurrealDB Capabilities docs (https://surrealdb.com/docs/surrealdb/security/capabilities).
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SurrealDB's full-text search supports custom text analyzers, and the mapper() filter (DEFINE ANALYZER ... FILTERS mapper('<path>')) loads a term-mapping file from local disk. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory / path traversal): the path supplied in SurrealQL was passed to the filesystem without effective containment. The intended containment mechanism, check_is_path_allowed against SURREAL_FILE_ALLOWLIST, treated an empty allowlist as 'allow everything' rather than 'deny everything', and empty is the shipped default. When the mapper file fails to parse, the analyzer error message echoes file content back to the caller, turning a parse error into an information-disclosure oracle. Only the first line of the target file is returned unless the file contains no newlines. The affected component is the Rust crate surrealdb (< 3.1.5).
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:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Network-reachable query interface (AV:N/AC:L) usable only by an authenticated EDITOR/OWNER account (PR:L); leaked process secrets cross a trust boundary (S:C) for high confidentiality loss with no integrity or availability impact.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
2DescriptionCVE.org
SurrealDB before 3.1.5 contains an arbitrary file read vulnerability in the DEFINE ANALYZER mapper filter that allows database users with EDITOR or OWNER roles to read files accessible to the SurrealDB process. Attackers can specify arbitrary file paths in the mapper filter and retrieve file contents through query error messages when the SURREAL_FILE_ALLOWLIST is empty or not configured.
Executive ViewAI
SurrealDB versions before 3.1.5 contain a file disclosure vulnerability allowing authenticated users with EDITOR or OWNER database roles to read arbitrary files accessible to the SurrealDB process. Organizations running affected deployments risk exposure of sensitive configuration files, credentials, or application secrets through privileged database accounts, with default security settings providing no protection.
Configure the SURREAL_FILE_ALLOWLIST environment variable with an explicit whitelist of only files genuinely required by your applications, immediately restricting the DEFINE ANALYZER mapper() filter's file access capability. Restrict EDITOR and OWNER database roles to trusted administrators only and implement audit logging on DEFINE ANALYZER commands. Monitor vendor advisories for release of version 3.1.5.
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
Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi
Session hijacking in SurrealDB before 3.1.0 lets unauthenticated attackers enumerate attached session UUIDs through the
SurrealDB versions before 3.3.0 fail to validate a caller's authorization level when the SurrealQL USE statement switche
Cross-tenant data access in SurrealDB before 3.3.0 allows an authenticated namespace- or database-level SYSTEM user to b
Cross-tenant authorization bypass in SurrealDB before 3.2.0 lets any authenticated user reach custom API endpoints belon
Confused-deputy privilege escalation in SurrealDB before 2.5.0 and before 3.0.0-beta.3 lets a low-privileged user (e.g.
Denial of service in SurrealDB before 3.1.5 lets an authenticated user with query-execution privileges crash the entire
Denial of service in SurrealDB versions before 3.3.0 lets a query-capable authenticated user with embedded JavaScript sc
Authenticated SurrealDB record users can read field values that field-level SELECT permissions are meant to conceal on S
EUVD-2026-45910
GHSA-pmgv-hp4m-3xjp
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB