Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-3633-g6mg-p6qq

GHSA-3633-g6mg-p6qq: SurrealDB memory exhaustion via string::replace using regex

April 11, 2025

An authenticated user can craft a query using the string::replace function that uses a Regex to perform a string replacement. As there is a failure to restrict the resulting string length, this enables an attacker to send a string::replace function to the SurrealDB server exhausting all the memory of the server due to string allocations. This eventually results in a Denial-of-Service situation for the SurrealDB server.

This issue was discovered and patched during an code audit and penetration test of SurrealDB by cure53. Using CVSSv4 definitions, the severity is High.

References

  • github.com/advisories/GHSA-3633-g6mg-p6qq
  • github.com/surrealdb/surrealdb
  • github.com/surrealdb/surrealdb/pull/5619
  • github.com/surrealdb/surrealdb/pull/5638
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-3633-g6mg-p6qq

Code Behaviors & Features

Detect and mitigate GHSA-3633-g6mg-p6qq with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.5, all versions starting from 2.1.0 before 2.1.5, all versions starting from 2.2.0 before 2.2.2

Fixed versions

  • 2.2.2
  • 2.1.5
  • 2.0.5

Solution

Upgrade to versions 2.0.5, 2.1.5, 2.2.2 or above.

Weakness

  • CWE-789: Memory Allocation with Excessive Size Value

Source file

cargo/surrealdb/GHSA-3633-g6mg-p6qq.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:31 +0000.