HIGH · CVSS 3.1 7.8

GHSA-m9qr-4rcq-3jhc: Data race and double free via unsound `Send`/`Sync` in `reblessive`

Published 2026-11-03 · Updated 2026-11-06 · Also known as RUSTSEC-2026-0454

Summary

An unsound implementation of `Send`/`Sync` in the `reblessive` dependency used by `surrealdb-core` allows data races, double drops, and memory corruption through safe Rust code. Engineering teams using affected versions of surrealdb-core must update their dependencies.

Who is affected

Local attackers or concurrent safe-code operations can trigger data races and double frees because driver futures can be duplicated and moved across threads despite holding non-Send state. This occurs when executing SurrealQL statements via the underlying `reblessive` tree stack, leading to potential high-severity security impacts on confidentiality, integrity, and availability.

Exploitability

The vulnerability requires local access with high attack complexity and low privileges, but requires no user interaction and can cross security domains (scope changed). EPSS is not yet available, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
crates.io surrealdb-core >= 0.0.0-0, < 4.0.0 4.0.0 cargo update -p surrealdb-core --precise 4.0.0

CVSS 3.1 vector

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

Attack vectorLocal
Attack complexityHigh
Privileges requiredLow
User interactionNone
ScopeChanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

FAQ

What packages are affected?

The crates.io package surrealdb-core is affected in versions introduced from 0.0.0-0 and fixed in 4.0.0.

Is unsafe code required at the call site to exploit this?

No, no unsafe code is needed at the call site; the flaw can be triggered entirely through safe Rust code.

How was the vulnerability resolved?

The unsound dependency was removed in version 4.0.0, and the parser now uses plain recursion.

Original advisory description
`dbs::Executor` drives every SurrealQL statement through `reblessive::tree::TreeStack`. In `reblessive 0.4.3` the runtime types unconditionally assert `Send`/`Sync` (`unsafe impl Send/Sync for Stack`, `TreeStack` and `Runner`), while the public entry points accept any future without a `Send` bound and store it type-erased in a bump allocator. Two safe-code consequences follow. First, `Runner::step_async`/`finish_async` return driver futures tied to the stack borrow rather than to `&mut self`, so a driver future can be duplicated; because `Stack` is `Sync` those futures are `Send`, and polling two copies on different threads runs `drive_top_task` concurrently - racy `Cell`/`UnsafeCell` access, double `pop_task()`/`pop_dealloc()` (double drop / double free) and a non-atomic `Option::take`. Second, `TreeStack: Send` lets safe code move a driver whose type-erased future captures `!Send` state (`Rc`, `RefCell`) to another thread while the creating thread keeps an alias of that state. No `unsafe` is needed at the call site. `surrealdb-core`'s own query futures are `Send` only because of the unsound `unsafe impl Send for TreeStack`, while the captured `&mut tree::Stk` is deliberately `!Send`. The unsound dependency was removed in 4.0.0 and the parser now uses plain recursion (commit `75407c4bcc`).

References

Source records: RUSTSEC-2026-0454 (OSV.dev).