---
id: "CVE-2026-121417"
kind: "vulnerability"
aliases: ["CVE-2026-121417"]
title: "SurrealDB: use-after-free in storage backends can crash or corrupt memory"
severity: "high"
cvss: 8.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["embedded", "package", "rust", "self-hosted", "surrealdb"]
not_affected_if: ["managed-hosting", "version-3.3.0-or-later"]
published_at: "2026-11-03T15:17:31+00:00"
first_seen_at: "2026-11-03T15:21:58+00:00"
updated_at: "2026-11-03T15:22:28+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-121417", "first_seen_at": "2026-11-03T15:21:58+00:00"}]
---

# SurrealDB: use-after-free in storage backends can crash or corrupt memory

SurrealDB before 3.3.0 has a use-after-free bug in its key-value storage backends, which can be triggered when a Rust program leaks a dispatched future and then drops the transaction. The result is that pool workers read and write freed memory, risking crashes or memory corruption.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the SurrealDB version in use, for example with `surreal version`, and compare it to `3.3.0`.
- If the database is embedded as a Rust crate in your own code, check whether `surrealdb-core` is pinned below `3.3.0` in `Cargo.lock`.
- Check whether your Rust code can leak a future (for example with `mem::forget`) before dropping a transaction.

## Fix

- Move SurrealDB and `surrealdb-core` to `3.3.0` or later.

## Timeline

- 2026-11-03T15:21:58+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-121417

## Documents

- [advisory] Vendor advisory: github.com https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pm86-cc75-q463
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/surrealdb-before-3.3.0-use-after-free-via-affinitypool-spawn-local-in-kv-backends
- [fix] Patch: github.com https://github.com/surrealdb/surrealdb/commit/17584a181979f04f2aaad867332c22db1caa511a

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
