NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Rust (crates.io)

GHSA-2cvj-g5r5-jrrg: SurrealDB has local file read of 2-column TSV files via analyzers

lowCVSS 4.0 2.3

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.

Published Apr 10, 2025

Affected packages

surrealdb

Ecosystem
Rust (crates.io)
Affected
>= 2.2.0, < 2.2.2
Fixed in
2.2.2
Check
cargo tree -i surrealdb

surrealdb

Ecosystem
Rust (crates.io)
Affected
< 2.1.5
Fixed in
2.1.5
Check
cargo tree -i surrealdb

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

Credited to cure53.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Rust (crates.io) vulnerabilities

All Rust (crates.io) entries