Advisory

GHSA-2cvj-g5r5-jrrg

Also known as: CVE-2025-71394

Summary

SurrealDB has local file read of 2-column TSV files via analyzers

Details

An authenticated system user at the root, namespace, or database levels can use the DEFINE ANALYZER statement to point to arbitrary file locations on the file system, and should the file be tab separated with two columns, the analyzer can be leveraged to exfiltrate the content.

This issue was discovered and patched during an code audit and penetration test of SurrealDB by cure53, the severity defined within cure53's preliminary finding is Low, matched by our CVSS v4 assessment.

Impact
Limited to unauthorised access to 2 column TSV files on the file system

Patches
A patch has been created that introduces a new environment variable, SURREAL_FILE_ALLOWLIST , which contains a list of allowed file paths. When a mapping file is processed, the mapper checks if the file’s path is within one of the allowed paths.

  • Versions 2.1.5, 2.2.2 and later are not affected by this issue.

Workarounds
Users unable to update may want to limit those with root, namespace, or database level users to trusted parties only.

References
SurrealQL Documentation - DEFINE ANALYZER
#5600

Severity

Low Basis: The source's own band: LOW

Dates

Published
2025-04-10 21:08 UTC
Modified
2026-07-19 03:56 UTC

Affected packages and fixes

surrealdb

crates.io · All systems

Affected

  • introduced 2.2.0, fixed 2.2.2 (semver)

Fixed versions

2.2.2

Fix

  • Fixed version 2.2.2
    cargo update -p surrealdb --precise 2.2.2

surrealdb

crates.io · All systems

Affected

  • introduced 0, fixed 2.1.5 (semver)

Fixed versions

2.1.5

Fix

  • Fixed version 2.1.5
    cargo update -p surrealdb --precise 2.1.5

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences