{"id":"CVE-2025-71394","aliases":["EUVD-2025-210485","GHSA-2cvj-g5r5-jrrg","GHSA-627h-wprw-6cpg"],"status":"published","title":"SurrealDB before 2.2.2 Local File Read via DEFINE ANALYZER","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.","severity":{"version":"4.0","score":2.3,"vector":"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","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00367,"percentile":0.3098,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2025-04-10T21:08:50Z","modified":"2026-10-31T02:30:45Z","fixes":[{"ecosystem":"crates.io","package":"surrealdb","fixed_in":["2.2.2","2.1.5"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"surrealdb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.2.0"},{"fixed":"2.2.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"surrealdb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.5"}]}]},{"source":"osv","ecosystem":"crates.io","package":"surrealdb","ranges":[{"type":"SEMVER","events":[{"introduced":"2.2.0"},{"fixed":"2.2.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"surrealdb","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.1.5"}]}]}],"products":[{"vendor":"surrealdb","product":"surrealdb"}],"references":[{"url":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-2cvj-g5r5-jrrg","tags":["vendor-advisory","Vendor Advisory","advisory","web"]},{"url":"https://www.vulncheck.com/advisories/surrealdb-before-local-file-read-via-define-analyzer","tags":["third-party-advisory","Third Party Advisory","advisory"]},{"url":"https://github.com/surrealdb/surrealdb/pull/5600","tags":["web"]},{"url":"https://github.com/advisories/GHSA-2cvj-g5r5-jrrg"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71394","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-627h-wprw-6cpg"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71394.json","tags":["advisory"]},{"url":"https://github.com/surrealdb/surrealdb","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-71394","title":"SurrealDB before 2.2.2 Local File Read via DEFINE ANALYZER","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.","status":"published","published":"2026-07-18T13:10:13.041Z","modified":"2026-10-29T21:15:21.419Z","cvss":[{"version":"4.0","score":2.3,"vector":"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","level":"low","assessor":"cna"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:32:42.751171Z"}],"euvd":[{"id":"EUVD-2025-210485","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.","status":"published","published":"2026-07-18T13:10:13Z","modified":"2026-10-29T21:15:21Z","cvss":[{"version":"4.0","score":2.3,"vector":"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","level":"low"}],"updated_at":"2026-11-02T16:59:14.250155Z"}],"ghsa":[{"id":"GHSA-2cvj-g5r5-jrrg","title":"SurrealDB has local file read of 2-column TSV files via analyzers ","description":"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.\n\nThis 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.\n\n### Impact\nLimited to unauthorised access to 2 column TSV files on the file system\n\n### Patches\nA 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.\n\n- Versions 2.1.5, 2.2.2 and later are not affected by this issue.\n\n### Workarounds\nUsers unable to update may want to limit those with root, namespace, or database level users to trusted parties only.\n\n### References\n[SurrealQL Documentation - DEFINE ANALYZER](https://surrealdb.com/docs/surrealql/statements/define/analyzer#define-analyzer-statement)\n[#5600](https://github.com/surrealdb/surrealdb/pull/5600)","status":"published","published":"2025-04-10T21:08:50Z","modified":"2025-04-10T21:08:51Z","cvss":[{"version":"4.0","score":2.3,"vector":"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","level":"low"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:38:39.044439Z"},{"id":"GHSA-627h-wprw-6cpg","title":"SurrealDB versions before 2.2.2 contain a local file read vulnerability in the DEFINE ANALYZER...","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.","status":"published","published":"2026-07-18T15:31:49Z","modified":"2026-08-13T15:35:15Z","cvss":[{"version":"4.0","score":2.3,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"low"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:10:25.845105Z"}],"nvd":[{"id":"CVE-2025-71394","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.","status":"published","published":"2026-07-18T14:17:10.837Z","modified":"2026-10-29T21:17:06.06Z","cvss":[{"version":"4.0","score":2.3,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"low","assessor":"secondary"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:12:02.535029Z"}],"osv":[{"id":"CVE-2025-71394","title":"SurrealDB before 2.2.2 Local File Read via DEFINE ANALYZER","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.","status":"published","published":"2026-07-18T13:10:13.041Z","modified":"2026-10-31T02:30:45.459487475Z","cvss":[{"version":"4.0","score":2.3,"vector":"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","level":"low"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:44:53.185592Z"},{"id":"GHSA-2cvj-g5r5-jrrg","title":"SurrealDB has local file read of 2-column TSV files via analyzers ","description":"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.\n\nThis 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.\n\n### Impact\nLimited to unauthorised access to 2 column TSV files on the file system\n\n### Patches\nA 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.\n\n- Versions 2.1.5, 2.2.2 and later are not affected by this issue.\n\n### Workarounds\nUsers unable to update may want to limit those with root, namespace, or database level users to trusted parties only.\n\n### References\n[SurrealQL Documentation - DEFINE ANALYZER](https://surrealdb.com/docs/surrealql/statements/define/analyzer#define-analyzer-statement)\n[#5600](https://github.com/surrealdb/surrealdb/pull/5600)","status":"published","published":"2025-04-10T21:08:50Z","modified":"2026-07-19T03:56:47.167418204Z","cvss":[{"version":"4.0","score":2.3,"vector":"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","level":"low"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:34.338541Z"}]}}
