CVE-2025-71394
mediumpriority · track · 17EPSS 0.004 · 30 %ileEUUSEPSS · scored 2026-10-28
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 0.6–4.3
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (6)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-2cvj-g5r5-jrrgSurrealDB has local file read of 2-column TSV files via analyzers 2025-04-10ghsa · osvUS
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](https://surrealdb.com/docs/surrealql/statements/define/analyzer#define-analyzer-statement) [#5600](https://github.com/surrealdb/surrealdb/pull/5600)
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/surrealdb/surrealdb/releasesPatchcnnvd
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-2cvj-g5r5-jrrgcnnvd
- https://www.vulncheck.com/advisories/surrealdb-before-local-file-read-via-define-analyzercnnvd
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-2cvj-g5r5-jrrgenisa_euvd
- https://www.vulncheck.com/advisories/surrealdb-before-local-file-read-via-define-analyzerenisa_euvd
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-2cvj-g5r5-jrrgVendor Advisorynvd
- https://www.vulncheck.com/advisories/surrealdb-before-local-file-read-via-define-analyzerThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan