Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-3824-qmfq-2qv7

GHSA-3824-qmfq-2qv7: SurrealDB no JavaScript script function default timeout could facilitate DoS

April 11, 2025

Through enabling the scripting capability. SurrealDB allows for advanced functions with complicated logic, by allowing embedded functions to be written in JavaScript.

These functions are bounded for memory and stack size, but not in time. An attacker could launch a number of long running functions that could potentially facilitate a Denial Of Service attack.

This vulnerability can only affect SurrealDB servers explicitly enabling the scripting capability with --allow-scripting or --allow-all and equivalent environment variables SURREAL_CAPS_ALLOW_SCRIPT=true and SURREAL_CAPS_ALLOW_ALL=true.

This 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.

References

  • github.com/advisories/GHSA-3824-qmfq-2qv7
  • github.com/surrealdb/surrealdb
  • github.com/surrealdb/surrealdb/pull/5597
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-3824-qmfq-2qv7

Code Behaviors & Features

Detect and mitigate GHSA-3824-qmfq-2qv7 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.0.5
  • 2.1.5

Solution

Upgrade to versions 2.0.5, 2.1.5, 2.2.2 or above.

Weakness

  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

cargo/surrealdb/GHSA-3824-qmfq-2qv7.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:41 +0000.