SurrealDB has local file read of 2-column TSV files via analyzers
LowCVE-2025-71394 · Published Apr 10, 2025 · updated Jul 19, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| surrealdb crates.io | >= 2.2.0, < 2.2.2 | 2.2.2 |
| < 2.1.5 | 2.1.5 |
Details and references
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)
- CVSS 4.0
- CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-22
- Also known as
- CVE-2025-71394
More surrealdb advisories
All| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Apr 102025 | SurrealDB has uncaught exception in Net module that leads to database crash CVE-2025-71391Highfixed in 2.0.5, 2.1.5, 2.2.2 | High | 2.0.5, 2.1.5, 2.2.2 |
| Apr 102025 | SurrealDB vulnerable to memory exhaustion via nested functions and scripts CVE-2025-71393Mediumfixed in 2.0.5, 2.1.5, 2.2.2 | Medium | 2.0.5, 2.1.5, 2.2.2 |
| Apr 112025 | SurrealDB server-takeover via SurrealQL injection on backup import CVE-2025-71392Criticalfixed in 2.0.5, 2.1.5, 2.2.2 | Critical | 2.0.5, 2.1.5, 2.2.2 |
| Apr 112025 | SurrealDB memory exhaustion via string::replace using regex CVE-2025-71395Highfixed in 2.0.5, 2.1.5, 2.2.2 | High | 2.0.5, 2.1.5, 2.2.2 |
| Apr 112025 | SurrealDB no JavaScript script function default timeout could facilitate DoS CVE-2025-71396Lowfixed in 2.0.5, 2.1.5, 2.2.2 | Low | 2.0.5, 2.1.5, 2.2.2 |
| Apr 112025 | SurrealDB CPU exhaustion via custom functions result in total DoS CVE-2025-71397Highfixed in 2.0.5, 2.1.5, 2.2.2 | High | 2.0.5, 2.1.5, 2.2.2 |