{"id":"CVE-2025-71395","title":"SurrealDB versions before 2.2.2 contain a memory exhaustion vulnerability in the string::replace function that fails to restrict resulting string length when using regex patterns","summary":"SurrealDB versions before 2.2.2 contain a memory exhaustion vulnerability in the string::replace function that fails to restrict resulting string length when using regex patterns. An authenticated attacker can craft a malicious query to …","severity":"medium","cvss":6.5,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-789"],"vendor":"surrealdb","product":"surrealdb","affected":["surrealdb < 2.0.5","surrealdb >= 2.1.0, < 2.1.5","surrealdb >= 2.2.0, < 2.2.2"],"patched":["surrealdb 2.2.2"],"published":"2026-07-18","updated":"2026-09-29","sourceUpdated":"2026-09-29T19:10:00.160","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-71395","references":[{"url":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-3633-g6mg-p6qq","label":"disclosure@vulncheck.com"},{"url":"https://www.vulncheck.com/advisories/surrealdb-before-memory-exhaustion-via-string-replace","label":"disclosure@vulncheck.com"}],"tags":["nvd","cve.org"],"epss":0.0045,"epssPercentile":0.38956,"ingestedAt":"2026-07-19T05:29:21.257Z","ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-22T19:09:25.666132Z"},"scores":{"nvd":6.5,"cna":7.1},"slug":"CVE-2025-71395","body":"## Overview\n\nSurrealDB versions before 2.2.2 contain a memory exhaustion vulnerability in the string::replace function that fails to restrict resulting string length when using regex patterns. An authenticated attacker can craft a malicious query to exhaust server memory through unbounded string allocations, causing denial of service.\n\n## Affected\n\n- `surrealdb < 2.0.5`\n- `surrealdb >= 2.1.0, < 2.1.5`\n- `surrealdb >= 2.2.0, < 2.2.2`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `surrealdb 2.2.2`","depth":"sunlit","depthScore":36,"depthScoreParts":{"impact":35.8,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[{"seq":212978,"id":"CVE-2025-71395","ts":1790711092800,"field":"cvss","old":null,"new":"6.5"},{"seq":212977,"id":"CVE-2025-71395","ts":1790711092800,"field":"severity","old":"none","new":"medium"}]}