{"id":"CVE-2025-71394","aliases":["CVE-2025-71394","GHSA-2cvj-g5r5-jrrg"],"related":[],"kind":"vulnerability","state":"published","title":"SurrealDB before 2.2.2 Local File Read via DEFINE ANALYZER","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones de SurrealDB anteriores a la 2.2.2 contienen una vulnerabilidad de lectura de archivos locales en la declaración DEFINE ANALYZER que permite a los usuarios autenticados leer archivos arbitrarios en el sistema de archivos. Los atacantes con privilegios a nivel de root, namespace o base de datos pueden apuntar analizadores a rutas de archivo arbitrarias y exfiltrar contenido de archivos de dos columnas separados por tabulaciones.","source":"nvd"}],"published":"2025-04-10T21:08:50.000Z","modified":"2026-10-29T21:17:06.060Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","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","score":2.3,"rating":"LOW"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","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","score":2.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"semver","introduced":"2.2.0","fixed":"2.2.2","status":"affected"},{"type":"semver","version":"2.2.2","status":"unaffected"}],"vendor":"surrealdb","product":"surrealdb","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"2.1.5","status":"affected"},{"type":"semver","version":"2.1.5","status":"unaffected"}],"vendor":"surrealdb","product":"surrealdb","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.2.0","status":"affected","fixed":"2.2.2"}],"ecosystem":"crates.io","package":"surrealdb","purl":"pkg:cargo/surrealdb","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.5"}],"ecosystem":"crates.io","package":"surrealdb","purl":"pkg:cargo/surrealdb","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.1.5"},{"status":"affected","introduced":"2.2.0","fixed":"2.2.2"}],"vendor":"surrealdb","product":"surrealdb","cpe":"cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-2cvj-g5r5-jrrg","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/surrealdb-before-local-file-read-via-define-analyzer","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/surrealdb/surrealdb/pull/5600","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/surrealdb/surrealdb","tags":["package"],"sources":["ghsa"]}],"credits":["cure53"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-20T19:23:34.568Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71394","url":"https://www.cve.org/CVERecord?id=CVE-2025-71394","licence":"CVE Terms of Use","modified":"2026-10-29T21:15:21.419Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2cvj-g5r5-jrrg","url":"https://github.com/advisories/GHSA-2cvj-g5r5-jrrg","licence":"CC-BY-4.0","modified":"2026-07-19T03:56:47.167Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71394","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71394","licence":"Public domain","modified":"2026-10-29T21:17:06.060Z"}],"updatedAt":"2026-11-25T22:59:12.404Z","epss":{"score":0.00314,"percentile":0.26294,"date":"2026-12-01T12:00:22.000Z"}}