GHSA-3V2X-9XCV-2V2V

SurrealDB's Trojan Horse: The Confused Deputy in Future Fields

Amit Schendel
Amit Schendel
Senior Security Researcher

Jan 23, 2026·6 min read·23 visits

Executive Summary (TL;DR)

SurrealDB allows users to define 'future' fields and functions that execute dynamically. Prior to version 2.5.0, this logic executed with the permissions of the *invoking* user, not the *creating* user. An attacker with basic 'Edit' rights can define a field that creates a Root user, wait for an actual Root admin to query that field, and effectively hijack the database using the admin's own credentials.

A critical Confused Deputy vulnerability in SurrealDB allows low-privileged users to plant malicious logic in database schemas (Functions, Future Fields) that subsequently executes with the high privileges of any administrator who interacts with them. This results in total system compromise via privilege escalation.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.04%
Top 100% most exploited

Affected Systems

SurrealDB (Standalone)SurrealDB (Embedded)SurrealKV

Affected Versions Detail

Product
Affected Versions
Fixed Version
SurrealDB
SurrealDB
< 2.5.02.5.0
SurrealDB
SurrealDB
< 3.0.0-beta.33.0.0-beta.3
AttributeDetail
CWE IDCWE-269
CWE NameImproper Privilege Management
Attack VectorNetwork (Authenticated)
CVSS7.5 (High)
ImpactPrivilege Escalation / RCE
Exploit StatusPoC Available
Patch Commitf515c91363ee735aa1bc08580d9e7fa0de6e736f
CWE-269
Improper Privilege Management

Vulnerability Timeline

Advisory Published
2025-02-18
Patch Released (v2.5.0)
2025-02-18

Subscribe to updates

Get the latest CVE analysis reports delivered to your inbox.