Summary
SurrealDB has local file read of 2-column TSV files via analyzers
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.
Workarounds
Users unable to update may want to limit those with root, namespace, or database level users to trusted parties only.
References
Impact
Limited to unauthorised access to 2 column TSV files on the file system
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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.
Frequently Asked Questions
- What is GHSA-2CVJ-G5R5-JRRG? GHSA-2CVJ-G5R5-JRRG is a low-severity path traversal vulnerability in surrealdb (rust), affecting versions >= 2.2.0, < 2.2.2. It is fixed in 2.2.2, 2.1.5. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- Which versions of surrealdb are affected by GHSA-2CVJ-G5R5-JRRG? surrealdb (rust) versions >= 2.2.0, < 2.2.2 is affected.
- Is there a fix for GHSA-2CVJ-G5R5-JRRG? Yes. GHSA-2CVJ-G5R5-JRRG is fixed in 2.2.2, 2.1.5. Upgrade to this version or later.
- Is GHSA-2CVJ-G5R5-JRRG exploitable, and should I be worried? Whether GHSA-2CVJ-G5R5-JRRG is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-2CVJ-G5R5-JRRG is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-2CVJ-G5R5-JRRG?
- Upgrade
surrealdbto 2.2.2 or later - Upgrade
surrealdbto 2.1.5 or later
- Upgrade