Skip to main content
Vulnerability Database/CVE-2026-109339

CVE-2026-109339: SurrealDB DOS Vulnerability

CVE-2026-109339 is a denial of service vulnerability in SurrealDB versions 3.1.0 to 3.3.0 that allows memory exhaustion through malicious modules. This post explains the technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-109339 Overview

CVE-2026-109339 is a memory exhaustion vulnerability affecting SurrealDB versions 3.1.0 through 3.3.0. The flaw resides in the Surrealism module subsystem, where stdout and stderr output from installed modules is buffered line-by-line in host memory without any upper bound. The configured module memory limit does not apply to this host-side buffer. An Owner-privileged user can install a malicious module that writes output without newline delimiters, forcing the host process to accumulate data until memory is exhausted. The result is a server crash that denies service to every namespace and database on the instance. The weakness is tracked as [CWE-770: Allocation of Resources Without Limits or Throttling].

Critical Impact

An Owner-installed Surrealism module can crash the SurrealDB server by writing unbounded output, denying service across all namespaces and databases on the host.

Affected Products

  • SurrealDB 3.1.0
  • SurrealDB versions after 3.1.0 and before 3.3.0
  • Surrealism module subsystem

Discovery Timeline

  • 2026-10-12 - CVE-2026-109339 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-109339

Vulnerability Analysis

SurrealDB supports Surrealism modules, which run as separate processes under configurable resource limits including a module memory limit. The host process captures each module's stdout and stderr streams for logging and diagnostic purposes. The capture logic reads output line-by-line and buffers each pending line in the host's address space before flushing it. Because the host buffer is governed by the host process, not the module sandbox, the configured module memory limit does not constrain its growth. A module that writes continuously without emitting a newline causes the pending line buffer to grow indefinitely. Once host memory is exhausted, the SurrealDB process terminates and every tenant on the instance loses availability.

Root Cause

The root cause is unbounded resource allocation in the module output capture path. The line-buffered reader waits for a newline before releasing or truncating the accumulated bytes. No maximum line length is enforced, and no spill-to-disk or discard policy exists. The module memory limit is evaluated inside the sandbox and does not account for memory consumed by the parent process on behalf of the module.

Attack Vector

Exploitation requires Owner-level privileges to install a Surrealism module. Once installed, the module writes a continuous byte stream to stdout or stderr without newline characters. The host accumulates the bytes until the operating system kills the SurrealDB process or the process aborts on allocation failure. The attack is network-reachable because module installation and invocation occur through the SurrealDB API. Availability on the host is fully impacted while confidentiality and integrity are not affected. See the GitHub Security Advisory and the VulnCheck Memory Exhaustion Advisory for additional technical context.

Detection Methods for CVE-2026-109339

Indicators of Compromise

  • Rapid growth in resident memory of the surreal server process without a corresponding increase in query workload.
  • Out-of-memory kills recorded in kernel logs (dmesg, journalctl -k) naming the SurrealDB process.
  • Surrealism module install or invocation events originating from unexpected Owner-level accounts.
  • Abrupt termination of all client sessions across multiple namespaces at the same timestamp.

Detection Strategies

  • Audit Surrealism module installations and record the SHA of each module binary for review.
  • Correlate module execution events with host memory metrics to identify runaway buffering.
  • Alert on SurrealDB process restarts and crash signatures tied to allocation failures.

Monitoring Recommendations

  • Collect per-process memory telemetry for the SurrealDB service and alert on sustained upward trends.
  • Forward SurrealDB server logs and host kernel OOM events to a centralized log pipeline for retention and analysis.
  • Monitor administrative API calls that install, update, or invoke Surrealism modules.

How to Mitigate CVE-2026-109339

Immediate Actions Required

  • Upgrade SurrealDB to version 3.3.0 or later on every affected instance.
  • Review the list of installed Surrealism modules and remove any that are not required for production workloads.
  • Restrict Owner-level credentials to a minimal set of trusted operators and rotate any shared credentials.
  • Enforce host-level memory limits on the SurrealDB process using cgroups or systemd slices to contain crash blast radius.

Patch Information

The vulnerability is fixed in SurrealDB 3.3.0. Upgrade guidance and the full technical write-up are available in the GitHub Security Advisory GHSA-jj89-wvrw-c4gp.

Workarounds

  • Disable the Surrealism module subsystem on instances that do not require it.
  • Limit Owner role assignments and require code review before any module is installed in production.
  • Run SurrealDB inside a container or systemd unit with a hard memory ceiling so an OOM condition is isolated to the service.
bash
# Example systemd override to cap SurrealDB memory and auto-restart on OOM
# /etc/systemd/system/surrealdb.service.d/override.conf
[Service]
MemoryMax=4G
MemoryHigh=3G
Restart=on-failure
RestartSec=5s

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.