{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.2.2"
              },
              {
                "fixed": "2.1.5"
              },
              {
                "fixed": "2.0.5"
              }
            ],
            "source": "AFFECTED_FIELD"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "e25952a66567ef303ad94908d04146e44a068d01"
            },
            {
              "fixed": "b0a15fa3a19ebe2785115c9948dfbde00399adc8"
            },
            {
              "fixed": "a83e960ee5513a3e39c88f312fabba83f8e15322"
            }
          ],
          "repo": "https://github.com/surrealdb/surrealdb",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-3633-g6mg-p6qq"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-789"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71395.json"
  },
  "details": "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 exhaust server memory through unbounded string allocations, causing denial of service.",
  "id": "CVE-2025-71395",
  "modified": "2026-07-20T03:31:18.802319904Z",
  "published": "2026-07-18T13:10:13.744Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71395.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-3633-g6mg-p6qq"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-71395"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/surrealdb-before-memory-exhaustion-via-string-replace"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "SurrealDB before 2.2.2 Memory Exhaustion via string::replace"
}