Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-jv2j-mqmw-xvv5

GHSA-jv2j-mqmw-xvv5: SurrealDB: Denial of Service via deep operator chains

June 19, 2026

An authenticated user could crash a SurrealDB server with a single query containing a long chain of operators.

Such a query — for example RETURN 1 + 1 + 1 + ... with tens of thousands of terms — is parsed into an expression tree one level deep per operator. Because the chain is flat and the pratt parser appends to it iteratively, the configured query- and object-recursion limits never fire, so the tree grows unbounded with the length of the query.

The root cause: the over-deep tree is later walked recursively, one call per node, when it is dropped, formatted, or lowered for execution — overflowing the thread stack and aborting the process.

References

  • github.com/advisories/GHSA-jv2j-mqmw-xvv5
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-jv2j-mqmw-xvv5

Code Behaviors & Features

Detect and mitigate GHSA-jv2j-mqmw-xvv5 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 starting from 3.0.0 before 3.1.5

Fixed versions

  • 3.1.5

Solution

Upgrade to version 3.1.5 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-674: Uncontrolled Recursion

Source file

cargo/surrealdb/GHSA-jv2j-mqmw-xvv5.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 23 Jun 2026 12:23:25 +0000.