CVE-2026-121417

SurrealDB before 3.3.0 Use-After-Free via affinitypool spawn_local in KV Backends

Published Nov 3, 2026 CVSS 4.0 · 8.8 High EPSS < 1% KEV · Not listed
Description
SurrealDB before 3.3.0 contains a use-after-free vulnerability in surrealdb-core KV backends that pass borrowed transaction state into affinitypool::spawn_local closures relying on future Drop for safety. Rust embedders that leak a dispatched future (e.g. via mem::forget) and drop the transaction cause pool workers to read and write freed memory, risking crashes or memory corruption.

Analysis

AI-generated

Technical impact

SurrealDB before 3.3.0 is vulnerable to a use‑after‑free because KV backends pass borrowed transaction state into affinitypool::spawn_local closures that depend on future drop for safety. If a Rust embedder leaks a dispatched future, such as by using mem::forget, and subsequently drops the transaction, pool workers may read or write memory that has already been freed. This results in crashes or untrusted memory corruption that could compromise confidentiality, integrity, or availability of the database.

Affected Systems

The issue affects SurrealDB versions earlier than 3.3.0 released by SurrealDB. Exact version ranges are not specified, but any deployment of SurrealDB before the 3.3.0 release is susceptible. No other vendors or products are listed as affected.

Risk and Exploitability

The CVSS score of 8.8 classifies the flaw as high severity. EPSS information is not available and the vulnerability is not listed in CISA KEV, suggesting limited known exploitation. Inferred attack vectors involve a Rust embedder that can trigger future leaks; an attacker would need the ability to influence the embedding code or supply data causing mem::forget usage. While exploitation is not trivially straightforward, the high local impact and memory corruption risk warrant close attention.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SurrealDB to version 3.3.0 or later to obtain the fixed KV backend.
  • If upgrading is not immediately possible, apply the patch from commit 17584a181979f04f2aaad867332c22db1caa511a or re‑implement the corrected logic to ensure futures are not leaked.
  • Review and refactor any Rust embedder code that uses mem::forget or otherwise leaks futures, and remove such patterns to prevent the use‑after‑free scenario.

Generated by OpenCVE AI on November 3, 2026 at 16:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description SurrealDB before 3.3.0 contains a use-after-free vulnerability in surrealdb-core KV backends that pass borrowed transaction state into affinitypool::spawn_local closures relying on future Drop for safety. Rust embedders that leak a dispatched future (e.g. via mem::forget) and drop the transaction cause pool workers to read and write freed memory, risking crashes or memory corruption.
Title SurrealDB before 3.3.0 Use-After-Free via affinitypool spawn_local in KV Backends
First Time appeared Surrealdb
Surrealdb surrealdb
Weaknesses CWE-416
CPEs cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*
Vendors & Products Surrealdb
Surrealdb surrealdb
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.8, 'vector': 'CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 3, 2026, 5:06 PM
Reserved
Nov 3, 2026, 12:29 PM
Status
Deferred
Published
Nov 3, 2026, 3:17 PM
Modified
Nov 3, 2026, 5:18 PM