Skip to main content

CVE-2026-63739 — Vulnerability in surrealdb — CVE Details

HIGH

SurrealDB: Arbitrary file read via DEFINE ANALYZER mapper() filter

Published June 19, 2026Updated November 4, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.48%). Schedule for your next planned update.

Does your project use an affected surrealdb version?

Paste your Cargo.lock to check it for CVE-2026-63739 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

Summary

SurrealDB's full-text search lets you define a text analyzer whose mapper filter loads a term-mapping file from disk (DEFINE ANALYZER ... FILTERS mapper('<path>')). A database user with the EDITOR or OWNER role could point that filter at any file the SurrealDB process can read and have its content returned in the query's error message.

File access is meant to be restricted by the SURREAL_FILE_ALLOWLIST setting, but an empty allowlist applied no restriction at all — and empty is the default.

Impact

The file is read with the privileges of the SurrealDB process, so a database EDITOR or OWNER user can disclose the contents of any file the process can access. Only the first line of the file is returned, except for files with no newlines.

However recovering the process's command line and environment could expose startup root credentials (--user / --pass) and secret environment variables, escalating a single-database role toward full control of the instance.

The read on the underlying filesystem is bounded by what the SurrealDB process can reach — any file readable by the OS user it runs as — so the impact scales with how the process is run and what is mounted into it.

Patches

A patch has been included in SurrealDB 3.1.5.

File access is now secure by default. check_is_path_allowed denies every path when no SURREAL_FILE_ALLOWLIST is configured, so the mapper filter cannot open any file unless the operator has explicitly allowed its directory. Analyzer parse errors no longer include the contents of the mapped file, only the line number.

Workarounds

Users unable to upgrade are advised to consider the following:

  • Set SURREAL_FILE_ALLOWLIST to a directory that contains only the intended mapping files; this confines the mapper filter to that path. On affected versions the allowlist must be non-empty to have any effect.
  • Grant the EDITOR and OWNER database roles only to trusted principals.
  • Avoid supplying secrets — including the root credentials — on the command line or through environment variables; prefer mounted files with least-privilege permissions.

References

Acknowledgements

Thanks to Jan Kahmen (@kah-ja) for finding and reporting this issue.

Advisory Timeline

  • First published June 19, 2026 (160 days ago).
  • Last revised November 4, 2026 — 137 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update surrealdb to 3.1.5 or later
cargo update -p surrealdb --precise 3.1.5

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: crates.io (1).

PackageFixed In
surrealdb crates.io · Affected: All versions3.1.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.7 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Frequently Asked Questions

What is CVE-2026-63739?
SurrealDB: Arbitrary file read via DEFINE ANALYZER mapper() filter. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.7/10).
How do I check if my project is affected by CVE-2026-63739?
CVE-2026-63739 affects surrealdb. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-63739 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.7

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.48%
EPSS percentile: 33.4

This is a below-median EPSS score — only 33.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-cc8f-fcx3-gpjr

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock