Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessEmbed surrealdb-core and hold Datastore/Transaction
-
DeliveryInvoke KV method dispatching to affinitypool::spawn_local
-
ExploitLeak returned future via mem::forget
-
ExecutionDrop transaction, ending borrows
-
PersistPool worker reads/writes freed mutex and transaction
-
ImpactCrash or memory corruption
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Not a default-configuration remote flaw. Exploitation requires ALL of: (1) a Rust program embedding surrealdb-core as a library and holding a public Datastore/Transaction (or Transactor); (2) calling a KV-backend method that dispatches blocking work into affinitypool::spawn_local - the advisory lists count, get/set point reads/writes, keys/keysr, scan/scanr, compact, shutdown, and open_keys_cursor/open_vals_cursor with next_batch/for_each on the rocksdb, mem and surrealkv backends; and (3) leaking the returned future via a safe mechanism (mem::forget, Box::leak, ManuallyDrop, an Rc/Arc cycle, or a leaked enclosing future) and then dropping the transaction while the pool worker is still running, so the future's Drop safety barrier never executes. LIMITING FACTORS: the vector is local/in-process (AV:L) - the vendor explicitly states no remote input (SurrealQL, JS, WASM, RPC) can reach the leak, so standard server deployments driven only by remote queries are not exposed; only builds whose Cargo.lock pins affinitypool 0.7.0 and whose kvs/ sources contain spawn_local call sites (versions before 3.3.0) are affected; and the embedder must itself commit the leak, so a correctly-written embedder that awaits or drops the future is not vulnerable. |
| Impact | Signals diverge sharply here. The CVSS 4.0 base score is 8.8 (High), but the vector itself tells the real story: AV:L (local, in-process), AC:H (high complexity), AT:P (a specific attack requirement must hold - an independent pool worker must still be using the borrows when they end), PR:L and UI:N. This is NOT a remotely reachable flaw. The vendor advisory is explicit that no remote input path (SurrealQL, JS, WASM, RPC) can trigger it, because no remote input can call mem::forget - only the embedder's own Rust code can leak the dispatched future. So the trigger is a soundness defect in the surrealdb-core public API that is reachable only when a Rust embedder leaks a future (mem::forget/Box::leak/ManuallyDrop/Rc-Arc cycle) and then drops the transaction. No CISA KEV listing is present (not confirmed actively exploited) and no EPSS score was provided, so the quantitative exploitation-probability signal is simply missing and cannot be weighed. The vuln.today decision label is 'this_week' - meaningful but explicitly NOT act_now or emergency. The GHSA advisory does publish a complete public-API PoC with an AddressSanitizer heap-use-after-free log, which raises credibility of the bug class, but PoC availability is a distinct signal from active exploitation and must not be conflated. Bottom line: this is a genuine, patch-worthy priority for anyone who embeds surrealdb-core as a Rust library, but the headline 8.8 overstates practical risk for standard remote/server deployments - it behaves much more like a constrained, local, embedder-dependent memory-safety bug than a widespread exploitable threat. One conflict to flag: the supplied CVSS 4.0 sets all subsequent-system metrics (SC/SI/SA) to High, implying a cross-system scope change, which the described single-process pool-worker UAF does not obviously support - verify with the vendor. |
| Exploit ScenarioDerived | A Rust application that embeds surrealdb-core holds a public Datastore/Transaction and calls a KV-backend method (e.g. Transactor::count on the RocksDB backend) whose blocking work is dispatched to affinitypool::spawn_local; the application then leaks the returned future with the safe mem::forget and drops the transaction while the pool worker is still scanning. The worker continues reading the freed MutexGuard/&Transaction and writes on mutex unlock, producing an AddressSanitizer-confirmed heap-use-after-free that risks crashes or memory corruption. The GHSA advisory publishes a complete public-API PoC source file and its full ASan log; the flaw is local/in-process only and cannot be reached through remote query, JS, WASM or RPC input. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 03, 2026
Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database as a library. The defect affects KV backends that pass borrowed transaction state into affinitypool::spawn_local closures; the embedder must leak the returned future and then drop the transaction while a pool worker is still running, defeating the future's Drop-based safety barrier. Exploitation is local and in-process - remote SurrealQL, JS, WASM, or RPC input cannot reach the leak - and a proof-of-concept is documented in the advisory, though publicly available working exploit code is not confirmed in the provided data.
RemediationAI
Vendor-released patch: upgrade SurrealDB Core / the surrealdb Rust crate to 3.3.0, which includes the fix referenced by commit 17584a181979f04f2aaad867332c22db1caa511a and the advisory https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pm86-cc75-q463. Until the upgrade, embedders should ensure they never leak futures returned by KV/Transactor methods-avoid mem::forget, Box::leak, ManuallyDrop, and Rc/Arc cycles around those futures, and always await or explicitly drop them before dropping the transaction; this preserves the future's Drop barrier and prevents the pool worker from using freed transaction state. The limitation is that this is a coding discipline control rather than an enforced API boundary, and any downstream embedder that leaks such a future remains exposed. The upstream change making spawn_local unsafe is on the unreleased 0.8 branch and is not a substitute for the 3.3.0 release.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SurrealDB Core's KV backends use affinitypool 0.7.0 spawn_local to move non-'static borrowed state-such as a tokio::sync::MutexGuard<Option<TransactionInner>>, &Transaction, scan state, guards, and RocksDB ReadOptions containing a raw rocksdb_snapshot_t*-onto pool workers. In affinitypool 0.7.0, spawn_local is a safe API whose soundness relies on the returned future's Drop implementation to cancel/park until the worker stops using those borrows; safe Rust can leak that future with mem::forget, Box::leak, ManuallyDrop, or an Rc/Arc cycle, ending the borrow while the worker still reads or writes the transaction allocation. This is CWE-416 use-after-free with related CWE-672 operation on a resource after expiration; AddressSanitizer reports a heap-use-after-free READ of the freed mutex data and a WRITE when the worker unlocks the freed tokio::sync::Mutex. The trigger requires a Rust embedder holding a public Datastore/Transaction/Transactor and calling a dispatching KV method, then leaking the future and dropping the transaction; it is not reachable from remote query input. Affected builds are those before 3.3.0 whose Cargo.lock pins affinitypool 0.7.0 and whose kvs sources contain spawn_local call sites; the vendor advisory identifies rocksdb, mem, and surrealkv paths and methods including count, get/set, keys/keysr, scan/scanr, compact, shutdown, and cursor operations. The assessed CVSS 3.1 vector is AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 8.8).
Know when Surrealdb gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Trigger is in-process Rust code leaking a dispatched future (AV:L, AC:H, PR:L); memory corruption supports high C/I/A, but no cross-system scope change is described, so S:U.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Technical POC Analysis
CWE-416 (use-after-free), reached without a single line of unsafe in the triggering code.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
SurrealDB Core versions before 3.3.0 contain a use-after-free vulnerability that can crash or corrupt memory in Rust applications embedding the database as a library. This requires a specific local development pattern-leaking a future and dropping a transaction while a pool worker is running-which is unlikely in production but poses a risk during development and testing. Leadership should prioritize patching embedded uses to prevent potential data corruption and application instability.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica
Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi
Session hijacking in SurrealDB before 3.1.0 lets unauthenticated attackers enumerate attached session UUIDs through the
SurrealDB versions before 3.3.0 fail to validate a caller's authorization level when the SurrealQL USE statement switche
Cross-tenant data access in SurrealDB before 3.3.0 allows an authenticated namespace- or database-level SYSTEM user to b
Cross-tenant authorization bypass in SurrealDB before 3.2.0 lets any authenticated user reach custom API endpoints belon
Cross-user MCP session takeover in SurrealDB 3.1.0 through 3.2.x allows an authenticated holder of even a lowest-role JW
Arbitrary file read in SurrealDB before 3.1.5 lets an authenticated database user holding the EDITOR or OWNER role discl
Confused-deputy privilege escalation in SurrealDB before 2.5.0 and before 3.0.0-beta.3 lets a low-privileged user (e.g.
Denial of service in SurrealDB before 3.1.5 lets an authenticated user with query-execution privileges crash the entire
EUVD-2026-115949
GHSA-7wmw-j7vc-669r
NVD
CVE.org
Vulnrichment
Exploit-DB