CVE-2025-71394
JSON

2.3low

SurrealDB before 2.2.2 Local File Read via DEFINE ANALYZER

Severity
2.3low CVSS:4.0 by VulnCheck
Exploit likelihood
0.31% (higher than 26% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-2cvj-g5r5-jrrg

Description

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.

Affected

Product or packageVersionsReported by
surrealdb surrealdbfrom 2.2.0 before 2.2.2, before 2.1.5
Not affected: 2.2.2, 2.1.5
CVE List, NVD
surrealdb (crates.io)from 2.2.0 before 2.2.2, before 2.1.5GitHub Advisory Database

All scores

VulnCheck2.3low CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
GitHublow CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
NVD4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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

NVD (es)

Las versiones de SurrealDB anteriores a la 2.2.2 contienen una vulnerabilidad de lectura de archivos locales en la declaración DEFINE ANALYZER que permite a los usuarios autenticados leer archivos arbitrarios en el sistema de archivos. Los atacantes con privilegios a nivel de root, namespace o base de datos pueden apuntar analizadores a rutas de archivo arbitrarias y exfiltrar contenido de archivos de dos columnas separados por tabulaciones.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-71394 changed 2026-10-29CVE Terms of Use
GitHub Advisory DatabaseGHSA-2cvj-g5r5-jrrg changed 2026-07-19CC-BY-4.0
NVDCVE-2025-71394 changed 2026-10-29Public domain