SECURITY & CVE TRACK RECORD

SurrealDB Security Advisories, CVEs & Patched Versions

Historical vulnerability disclosures, CVSS severity ratings, affected version ranges, and verified patch releases for SurrealDB.

Total Tracked Advisories
57
56 distinct CVE numbers
Critical & High Severity
17
30% of all disclosures
Latest Security Fix
3.3.0
Read patch changelog →
Security Posture Status
High Scrutiny
Deterministic OSV.dev telemetry
Tracked Vulnerability Timeline (57)
🛡️ CVE-2026-121417 RUSTSEC-2026-0453 Oct 19, 2026
HIGH (CVSS 7.8)

Use-after-free in KV backends via leaked `affinitypool::spawn_local` future

The `kv-mem`, `kv-surrealkv` and `kv-rocksdb` backends move non-`'static` borrowed state into affinity-pool closures through `affinitypool::spawn_local`: a `tokio::sync::MutexGuard<Option<TransactionInner>>`, `&Transaction`, `&mut ScanStateKeys/Vals`, `&mut dyn KeyVisitor/ValV...

Vulnerable Range: 0.0.0-0 -> 3.3.0
Fix Version: 3.3.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63735 GHSA-848m-r628-vrxw Sep 04, 2026
HIGH (CVSS 8.1)

SurrealDB: Custom API route lets authenticated callers override namespace/database scope via URL path

An authenticated user scoped to one namespace/database could invoke a custom API (`DEFINE API`) belonging to a different namespace/database, reaching another tenant's endpoint. The route `/api/{namespace}/{database}/{endpoint}` took the namespace and database from the URL and...

Vulnerable Range: 0 -> 3.2.0
Fix Version: 3.2.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71390 GHSA-m3c3-78fh-w3w7 Sep 04, 2026
MEDIUM

SurrealDB allows bypass of deny-net flags via DNS resolution

SurrealDB offers http functions that can access external network endpoints. A typical, albeit [not recommended ](https://surrealdb.com/docs/surrealdb/reference-guide/security-best-practices#example-deny-all-capabilities-with-some-exceptions)configuration would be to start Surr...

Vulnerable Range: 2.1.0 -> 2.1.8, 2.2.0 -> 2.2.6, 3.0.0-alpha.1 -> 3.0.0-alpha.7
Fix Version: 2.1.8 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63740 GHSA-8rw6-p7m8-63jp Aug 14, 2026
MEDIUM (CVSS 6.5)

SurrealDB: Array element-level (field.*) SELECT permissions leak denied elements to record users

A `SELECT` permission defined on an array element (`DEFINE FIELD field.* … PERMISSIONS FOR select …`) is not enforced correctly for `RECORD` users. Instead of hiding the denied elements, the query leaks a subset of them: a deny-all returns the odd-indexed elements, and a per-e...

Vulnerable Range: 0 -> 3.1.4
Fix Version: 3.1.4 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-49997 GHSA-whwg-vh4f-pmmf Jul 01, 2026
MEDIUM (CVSS 5.4)

SurrealDB: Edge PERMISSIONS FOR delete bypassed when a connected node is deleted

In SurrealDB, records can be connected as a graph: a `RELATE` statement creates an edge record between two node records. If either endpoint node is deleted, SurrealDB automatically removes the edge row to keep the graph consistent. A user with permission to delete a node coul...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63761 GHSA-fwg2-gr34-q3w8 Jul 01, 2026
MEDIUM (CVSS 4.3)

SurrealDB: ES512 silently downgraded to ES384 due to jsonwebtoken crate limitation

When a user configures `ALGORITHM ES512` for any JWT access method (`DEFINE ACCESS ... TYPE JWT ALGORITHM ES512`), SurrealDB silently substitutes ES384 at all four internal algorithm conversion points. This occurs because the underlying `jsonwebtoken` crate (v10.x) does not in...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63742 GHSA-c8jx-96c9-8xrp Jul 01, 2026
MEDIUM (CVSS 4.3)

SurrealDB: Field-level SELECT permissions bypassed via indexed COUNT fast paths

A record user could learn the value of a hidden field by counting how many records match a guess. When `DEFINE FIELD ... PERMISSIONS FOR select WHERE ...` hides a field's contents from a caller, and that field is indexed, running `SELECT count() FROM t WHERE hidden_field = "g...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63741 GHSA-wp87-mgvq-5j93 Jul 01, 2026
MEDIUM (CVSS 6.5)

SurrealDB: USE NS/DB implicit creation bypasses DEFINE authorization

An anonymous caller could create new namespaces and databases on a running SurrealDB instance without holding `DEFINE NAMESPACE` or `DEFINE DATABASE` permission. `USE NS <name>` and `USE DB <name>` automatically create the target when it does not exist. The three places `USE`...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63743 GHSA-97vg-427p-8hx5 Jul 01, 2026
MEDIUM (CVSS 6.4)

SurrealDB: Port-specific --deny-net rules silently bypassed on HTTP redirect

SurrealDB offers `http::*` functions that can access external network endpoints, with the `--allow-net` and `--deny-net` capabilities used to restrict the set of network targets that can be reached. An authenticated user of SurrealDB can bypass a port-scoped `--deny-net <host>...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63749 GHSA-6wqw-vhfr-9999 Jul 01, 2026
MEDIUM (CVSS 4.3)

SurrealDB: Authenticated subscribers can read records hidden by SELECT permissions via LIVE subscriptions

A record user could read records the table's SELECT permission expression should have hidden, when that expression referenced `$value`, `$before`, `$after`, or `$event`. Binding a chosen value to that name before registering a `LIVE SELECT` caused notifications to evaluate the...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63752 GHSA-f82j-v89j-mf86 Jul 01, 2026
MEDIUM (CVSS 4.3)

SurrealDB: `RELATE` overwrites existing edge records without `UPDATE` permission

`RELATE` creates an edge record between two existing records, and SurrealDB enforces the `CREATE` permission on the edge table for this operation. When the statement included a `SET id = edge:existing` clause, however, the new edge's id ended up pointing at an record that was ...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63751 GHSA-fpxg-5xmv-922m Jul 01, 2026
MEDIUM (CVSS 4.3)

SurrealDB has bypass of field-level SELECT permissions through JSON Patch `copy` and `move` with empty `from`

SurrealDB lets callers modify records using JSON Patch operations via the `UPDATE … PATCH` statement (and SDK equivalents such as `db.patch()`). One of those operations is `copy`, which duplicates one field's value into another field of the same record. A `PATCH` with an empty...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63748 GHSA-6g9v-7gq3-p2c6 Jul 01, 2026
MEDIUM (CVSS 4.3)

SurrealDB: Authenticated callers can read fields hidden by field-level SELECT permissions via error messages

A record user with UPDATE access could read field values that field-level SELECT permissions hid from them. Arithmetic operators and `extend` embedded the raw operand into their error messages, and UPDATE permission checks evaluate against the unreduced document - so triggerin...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63753 GHSA-4m82-p8cx-f94j Jul 01, 2026
MEDIUM (CVSS 4.3)

SurrealDB: LIVE query subscriptions survive session state changes, bypassing access controls

A `LIVE SELECT` subscription records the user's auth state (`$auth`, `$token`, `$session`, `$access`) when it is registered, and the server uses that recorded state to evaluate the table- and row-level `PERMISSIONS` clauses for every subsequent notification. The recorded state...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63750 GHSA-65rj-r9fh-jp2v Jul 01, 2026
MEDIUM (CVSS 5.3)

SurrealDB vulnerable to pre-auth memory amplification via unbounded `/sql` WebSocket frames

An anonymous caller could degrade `/sql` availability by streaming WebSocket frames many times larger than the operator-configured per-connection limit. The `/sql` upgrade handler accepted anonymous connections and did not propagate `SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE` to the ...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63758 GHSA-gcwr-5mrf-fvch Jul 01, 2026
MEDIUM (CVSS 5.4)

SurrealDB: Authorization Bypass in KILL Statement Allows Termination of Other Users' Live Queries

The `KILL` statement is used to terminate `LIVE SELECT` subscriptions that capture real-time changes to data within a table. The `KILL` statement implementation in `core/src/expr/statements/kill.rs` verifies that the requesting user has database-level access, but does not veri...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63754 GHSA-4v76-cw68-4vc9 Jul 01, 2026
MEDIUM (CVSS 6.5)

SurrealDB: Crafting malicious LIVE queries writes to the database, resulting in DoS, without permission to the table required

A `LIVE` query whose `WHERE` clause evaluates to an error caused the source data modifier (the user creating, updating, or deleting a record on the watched table) to fail instead. Calling any arbitrary SurrealQL function with a typed parameter and passing a value of the wrong ...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63745 GHSA-6vg3-hgrw-p5gf Jul 01, 2026
MEDIUM (CVSS 5.4)

SurrealDB has an Authorization Bypass via Composite Record-id Paths

An authenticated user could bypass permission rules that gated access on parts of a record's id - most commonly tenant-isolation rules of the form `PERMISSIONS FOR select WHERE id.tenant = $auth.id.tenant`. The same defect also let UNIQUE constraints defined on parts of an id ...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63746 GHSA-vjjx-rfw4-rmfc Jul 01, 2026
MEDIUM (CVSS 6.5)

SurrealDB: Graph traversal bypasses table SELECT permissions

An authenticated record or scope user could read records on any table reachable through a graph edge or `REFERENCES TO` back-reference, regardless of that table's `PERMISSIONS FOR select` clause. Traversing `SELECT * FROM source->edge->target` returned full documents from `ta...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63755 GHSA-98fx-66cf-fc7c Jul 01, 2026
MEDIUM (CVSS 6.5)

SurrealDB: Scraping a TABLE with no available PERMISSIONS to current auth level

A vulnerability was discovered where the user-supplied `WHERE` clause in a `SELECT` statement is evaluated against the full record data before `PERMISSIONS FOR SELECT WHERE` determines whether the principal is authorised to access that record. A side-effecting expression in th...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63759 GHSA-q8qp-67f9-wr3f Jul 01, 2026
MEDIUM (CVSS 6.5)

SurrealDB vulnerable to Denial of Service due to nested types annotations

The SurrealDB type/kind parser did not enforce the configured recursion depth limit when parsing nested type annotations. The expression parser already enforced the limit for analogous constructs; the kind parser omitted it. An authenticated attacker could send a query with de...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63747 GHSA-wjjj-24cx-f28g Jul 01, 2026
HIGH (CVSS 7.5)

SurrealDB has unauthenticated remote DoS via malformed RPC `use` call

A single unauthenticated WebSocket message to `/rpc` crashed the SurrealDB server. Sending `use { db: "x" }` without first selecting a namespace hit `.expect("namespace should be set")` in the `use` handler; because `surrealdb-core` is built with `panic = 'abort'`, the panic t...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63760 GHSA-q729-696q-g9pq Jul 01, 2026
HIGH (CVSS 7.5)

SurrealDB has Denial of Service in JSON parser due to nested objects

The SurrealDB value and JSON parser did not enforce the configured recursion depth limit when parsing nested `{`, `[`, or `(` tokens. The expression parser already enforced the limit for these tokens; the value/JSON parser omitted it. An unauthenticated attacker could send a d...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63756 GHSA-4vgr-h27g-cf9p Jul 01, 2026
HIGH (CVSS 8.1)

SurrealDB: HTTP RPC Session Race Condition Allows Privilege Escalation

The HTTP `/rpc` endpoint has a time-of-check/time-of-use (TOCTOU) race condition on internal session state. When authenticated and unauthenticated requests are processed concurrently, the unauthenticated request can inherit the authenticated user's session and privileges. The ...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63757 GHSA-5qfp-32cf-69jh Jul 01, 2026
HIGH (CVSS 8.8)

SurrealDB: HTTP /rpc `sessions` method leaks attached session UUIDs, enabling full session hijack by anonymous callers

The HTTP `/rpc` `sessions` method returned every attached session UUID without authentication, and the `/rpc` handler accepted an arbitrary `session` field with no ownership check. An anonymous caller could enumerate UUIDs and impersonate any authenticated session. "Attached"...

Vulnerable Range: 0 -> 3.1.0
Fix Version: 3.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63737 GHSA-jv2j-mqmw-xvv5 Jun 19, 2026
MEDIUM (CVSS 6.5)

SurrealDB: Denial of Service via deep operator chains

An authenticated user could crash a SurrealDB server with a single query containing a long chain of operators. Such a query - for example `RETURN 1 + 1 + 1 + ...` with tens of thousands of terms - is parsed into an expression tree one level deep per operator. Because the chai...

Vulnerable Range: 3.0.0 -> 3.1.5
Fix Version: 3.1.5 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63738 GHSA-hv6h-hc26-q48p Jun 19, 2026
MEDIUM (CVSS 4.3)

SurrealDB: Field-level SELECT permissions bypassed via graph and reference traversals

A record user could read field values hidden from them by field-level SELECT permissions by reaching the records through a graph-edge (`->`) or back-reference (`<~`) traversal instead of a direct `SELECT`. When a table was readable at the table level but carried a field hidde...

Vulnerable Range: 3.1.0 -> 3.1.5
Fix Version: 3.1.5 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63309 GHSA-h4h3-3rfj-x6fq Jun 19, 2026
MEDIUM (CVSS 4.3)

SurrealDB: Indexed ORDER BY leaks the value ordering of a SELECT-restricted field

A field can be hidden from a user with a field-level SELECT permission (`DEFINE FIELD code ON secret PERMISSIONS FOR select WHERE owner = $auth.id`). When that field is indexed, a record user who cannot read it could still recover the relative ordering of its values across eve...

Vulnerable Range: 3.0.0 -> 3.1.5
Fix Version: 3.1.5 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63739 GHSA-cc8f-fcx3-gpjr Jun 19, 2026
HIGH (CVSS 7.7)

SurrealDB: Arbitrary file read via DEFINE ANALYZER mapper() filter

SurrealDB's full-text search lets you define a text analyzer whose `mapper` filter loads a term-mapping file from disk (`DEFINE ANALYZER ... FILTERS mapper('<path>')`). A database user with the `EDITOR` or `OWNER` role could point that filter at any file the SurrealDB process ...

Vulnerable Range: 0 -> 3.1.5
Fix Version: 3.1.5 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63744 GHSA-h5rg-8p7f-47g2 Jun 19, 2026
MEDIUM (CVSS 4.1)

SurrealDB: SSRF via JWKS URL - Redirect Following in JWT Key Fetch

SurrealDB fetches the JWKS document for a JWT or record access method using a bare `reqwest` client that follows HTTP redirects by default. The network capability check in `core/src/iam/jwks.rs` (`check_capabilities_url`) is applied only to the originally configured URL; redir...

Vulnerable Range: 0 -> 3.1.5
Fix Version: 3.1.5 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63762 GHSA-xx7m-69ff-9crp Feb 12, 2026
MEDIUM

SurrealDB vulnerable to Denial of Service through scripting function memory edge case

In SurrealDB instances with the scripting capability enabled (`--allow-scripting`), users with the ability to run arbitrary queries can trigger a server crash due to a memory-safety bug in the underlying JS engine. The SurrealDB instance terminates instantly, requiring a manu...

Vulnerable Range: 0 -> 2.6.1, 3.0.0-alpha.8 -> 3.0.0-beta.3
Fix Version: 2.6.1 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2026-63763 GHSA-3v2x-9xcv-2v2v Jan 22, 2026
HIGH

SurrealDB Affected by Confused Deputy Privilege Escalation through Future Fields and Functions

Unprivileged users (for example, those with the database editor role) can create or modify fields in records that contain functions or `futures`. `Futures` are values which are only computed when the value is queried. The query executes in the context of the querying user, rat...

Vulnerable Range: 0 -> 2.5.0, 3.0.0-alpha.1 -> 3.0.0-beta.3
Fix Version: 2.5.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-11060 GHSA-7vm2-j586-vcvc Sep 11, 2025
MEDIUM

SurrealDB is Vulnerable to Unauthorized Data Exposure via LIVE Query Subscriptions

`LIVE SELECT` statements are used to capture changes to data within a table in real time. Documents included in `WHERE` conditions and `DELETE` notifications were not properly reduced to respect the querying user's security context. Instead the leaked documents reflect the con...

Vulnerable Range: 2.3.0 -> 2.3.8, 2.2.0 -> 2.2.8, 0 -> 2.1.9
Fix Version: 2.3.8 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71398 GHSA-5q9x-554g-9jgg Apr 11, 2025
MEDIUM

SurrealDB bypass of deny-net flags via redirect results in server-side request forgery (SSRF)

SurrealDB offers http functions that can access external network endpoints. A typical, albeit [not recommended ](https://surrealdb.com/docs/surrealdb/reference-guide/security-best-practices#example-deny-all-capabilities-with-some-exceptions) configuration would be to start Sur...

Vulnerable Range: 2.2.0 -> 2.2.2, 2.1.0 -> 2.1.5, 0 -> 2.0.5
Fix Version: 2.2.2 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71397 GHSA-pxw4-94j3-v9pf Apr 11, 2025
HIGH

SurrealDB CPU exhaustion via custom functions result in total DoS

SurrealDB allows authenticated users with `OWNER` or `EDITOR` permissions at the root, database or namespace levels to define their own database functions using the `DEFINE FUNCTION` statement A custom database function comprises a name together with a function body. In the f...

Vulnerable Range: 2.2.0 -> 2.2.2, 2.1.0 -> 2.1.5, 0 -> 2.0.5
Fix Version: 2.2.2 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71396 GHSA-3824-qmfq-2qv7 Apr 11, 2025
LOW

SurrealDB no JavaScript script function default timeout could facilitate DoS

Through enabling the scripting capability. SurrealDB allows for advanced functions with complicated logic, by allowing embedded functions to be written in JavaScript. These functions are bounded for memory and stack size, but not in time. An attacker could launch a number of ...

Vulnerable Range: 2.2.0 -> 2.2.2, 0 -> 2.0.5, 2.1.0 -> 2.1.5
Fix Version: 2.2.2 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71395 GHSA-3633-g6mg-p6qq Apr 11, 2025
HIGH

SurrealDB memory exhaustion via string::replace using regex

An authenticated user can craft a query using the `string::replace` function that uses a Regex to perform a string replacement. As there is a failure to restrict the resulting string length, this enables an attacker to send a `string::replace` function to the SurrealDB server ...

Vulnerable Range: 2.2.0 -> 2.2.2, 2.1.0 -> 2.1.5, 0 -> 2.0.5
Fix Version: 2.2.2 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71392 GHSA-ccj3-5p93-8p42 Apr 11, 2025
CRITICAL

SurrealDB server-takeover via SurrealQL injection on backup import

The SurrealDB command-line tool allows exporting databases through the `export` command. It was discovered that table or field names are not properly sanitized in exports, leading to a SurrealQL injection when the backup is reimported. For the injection to occur, an authentic...

Vulnerable Range: 2.2.0 -> 2.2.2, 2.1.0 -> 2.1.5, 0 -> 2.0.5
Fix Version: 2.2.2 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71394 GHSA-2cvj-g5r5-jrrg Apr 10, 2025
LOW

SurrealDB has local file read of 2-column TSV files via analyzers

An authenticated system user at the root, namespace, or database levels can use the `DEFINE ANALYZER` statement to point to arbitrary file locations on the file system, and should the file be tab separated with two columns, the analyzer can be leveraged to exfiltrate the conte...

Vulnerable Range: 2.2.0 -> 2.2.2, 0 -> 2.1.5
Fix Version: 2.2.2 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71393 GHSA-m7rc-8w7m-r9qr Apr 10, 2025
MEDIUM

SurrealDB vulnerable to memory exhaustion via nested functions and scripts

In order to prevent DoS situations due to infinite recursions, SurrealDB implements a limit of nested calls for both native functions and embedded JavaScript functions. However, in SurrealDB instances with embedded scripting functions enabled, it was found that this limit can...

Vulnerable Range: 2.2.0 -> 2.2.2, 2.1.0 -> 2.1.5, 0 -> 2.0.5
Fix Version: 2.2.2 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2025-71391 GHSA-rq86-9m6r-cm3g Apr 10, 2025
HIGH

SurrealDB has uncaught exception in Net module that leads to database crash

A vulnerability was found where an attacker can crash the database via crafting a HTTP query that returns a null byte. The problem relies on an uncaught exception in the `net` module, where the result of the query will be converted to JSON before showing as the HTTP response t...

Vulnerable Range: 2.2.0 -> 2.2.2, 2.1.0 -> 2.1.5, 0 -> 2.0.5
Fix Version: 2.2.2 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58356 GHSA-27vq-hv74-7cqp Dec 16, 2024
LOW

SurrealDB has Silent Failure to Overwrite Table Definition of Relation Type

The `OVERWRITE` clause of the `DEFINE TABLE` statement would fail to overwrite data for tables that were defined with `TYPE RELATION`. Since table definitions include the `PERMISSIONS` clause, this failure would result in permissions not being overwritten as a result, which ma...

Vulnerable Range: 2.0.0 -> 2.1.4, 2.0.0 -> 2.1.4
Fix Version: 2.1.4 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58359 GHSA-m52v-24p8-654f Nov 22, 2024
MEDIUM (CVSS 6.5)

SurrealDB has an Uncaught Exception Sorting Tables by Random Order

Sorting table records using an `ORDER BY` clause with the `rand()` function as sorting mechanism could cause a panic due to relying on a comparison function that did not implement total order. This event resulted in a panic due to a recent [change in Rust 1.81](https://blog.ru...

Vulnerable Range: 0 -> 2.1.0, 0 -> 2.1.0
Fix Version: 2.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58358 GHSA-jc55-246c-r88f Nov 22, 2024
MEDIUM (CVSS 4.9)

SurrealDB has an Uncaught Exception Handling Nonexistent Role

Roles for system users are stored as generic `Ident` values and converted as strings and into the `Role` enum whenever IAM operations are to be performed that require processing the user roles. This conversion expects those identifiers to only contain the values `owner`, `edit...

Vulnerable Range: 0 -> 2.1.0, 0 -> 2.1.0
Fix Version: 2.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58357 GHSA-h4f5-h82v-5w4r Nov 22, 2024
MEDIUM (CVSS 6.5)

SurrealDB has an Uncaught Exception in Function Generating Random Time

The `rand::time()` function in SurrealQL generates a random time from an optional range of two Unix timestamps. Due to the underlying use of `timestamp_opt` from the `chrono` crate, this function could potentially return `None` in some instances, leading to a panic when `unwra...

Vulnerable Range: 0 -> 2.1.0, 0 -> 2.1.0
Fix Version: 2.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58367 GHSA-9722-9j67-vjcr Oct 08, 2024
MEDIUM (CVSS 6.5)

SurrealDB: Improper Authorization in Select Permissions

Due to the order in which permissions were processed, some statements, filters and computations could lead to leaking field values or record contents to users without the required permissions. This behavior could be triggered in different scenarios: - When performing a `SELEC...

Vulnerable Range: 0 -> 2.0.4, 0 -> 2.0.4
Fix Version: 2.0.4 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58361 GHSA-qjrv-v6qp-x99x Oct 08, 2024
MEDIUM (CVSS 6.5)

SurrealDB has an Uncaught Exception Handling Parsing Errors on Empty Strings

The error rendering code from the parser would panic when handling failed parsing of queries where the error occurred when converting an empty string to a SurrealDB value. This would be the case when casting an empty string to a `record`, `duration` or `datetime`, as well as p...

Vulnerable Range: 2.0.0 -> 2.0.4, 2.0.0 -> 2.0.4
Fix Version: 2.0.4 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58362 GHSA-64f8-pjgr-9wmr Sep 11, 2024
HIGH (CVSS 8.8)

Untrusted Query Object Evaluation in RPC API

During the sign in and sign up operations through the SurrealDB RPC API, an arbitrary object would be accepted in order to support a wide array of types and structures that could contain user credentials. This arbitrary object could potentially contain any SurrealDB value, inc...

Vulnerable Range: 0 -> 1.5.5, 0 -> 1.5.2, 2.0.0-beta.1 -> 2.0.0-beta.3
Fix Version: 1.5.5 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58363 GHSA-gh9f-6xm2-c4j2 Jul 11, 2024
MEDIUM (CVSS 6.3)

SurrealDB vulnerable to Improper Authentication when Changing Databases as Scope User

Authentication would not be properly validated when an already authenticated scope user would use the `use` method or `USE` clause to switch working databases in a session. If there was a user record in the new database with identical record identifier as the original record t...

Vulnerable Range: 0 -> 1.5.4, 2.0.0-alpha.1 -> 2.0.0-alpha.6, 0 -> 1.5.1
Fix Version: 1.5.4 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58366 GHSA-q3gg-m8hr-h4x4 Feb 21, 2024
HIGH (CVSS 8.5)

Externally Controlled Format String in Scripting Functions

The `rquickjs` crate used by SurrealDB implements Rust bindings to the QuickJS C library and is used to execute SurrealDB scripting functions. The `rquickjs` function `Exception::throw_type` takes a string and returns an error object. Prior to version `0.4.2` of the crate, thi...

Vulnerable Range: 0 -> 1.1.1
Fix Version: 1.1.1 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58365 GHSA-6wr5-jmpr-mjcx Feb 21, 2024
MEDIUM (CVSS 6.5)

Uncaught Exception in Macro Expecting Native Function to Exist

The query executor would panic when executing a query containing a call to a built-in SurrealDB function that did not exist. This could occur accidentally in situations where the version of the SurrealDB client was newer than the SurrealDB server or when a pre-parsed query was...

Vulnerable Range: 0 -> 1.2.0
Fix Version: 1.2.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58364 GHSA-8xff-473h-f863 Feb 21, 2024
MEDIUM (CVSS 6.5)

Uncaught Exception Handling Parsing Errors on Line Terminators

The span rendering would panic when handling failed parsing of queries where the error occurred on a line terminator character. ### Impact A client that is authorized to run queries in a SurrealDB server is able to execute a malformed query which will fail to parse on a line...

Vulnerable Range: 0 -> 1.2.1
Fix Version: 1.2.1 (Read Notes →)
Official Advisory Source ↗
GHSA-58j9-j2fj-v8f4 Jan 19, 2024
HIGH (CVSS 7.5)

SurrealDB vulnerable to Uncontrolled CPU Consumption via WebSocket Interface

SurrealDB depends on the `tungstenite` and `tokio-tungstenite` crates used by the `axum` crate, which handles connections to the SurrealDB WebSocket interface. On versions before `0.20.1`, the `tungstenite` crate presented an issue which allowed the parsing of HTTP headers dur...

Vulnerable Range: 0 -> 1.1.0
Fix Version: 1.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58370 GHSA-6r8p-hpg7-825g Jan 18, 2024
MEDIUM (CVSS 6.5)

Uncontrolled Recursion in SurrealQL Parsing

In some specific instances, the SurrealQL parser will attempt to recursively parse nested statements or idioms (i.e. nested `IF` and `RELATE` statements, nested basic idioms and nested access to attributes) without checking if the depth limit established by default or in the `...

Vulnerable Range: 0 -> 1.1.0
Fix Version: 1.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58368 GHSA-m24x-r6q3-2vp9 Jan 18, 2024
HIGH (CVSS 7.5)

Uncaught Exception processing HTTP Headers in SurrealDB

The `ID`, `DB` and `NS` headers accepted by the SurrealDB HTTP REST API would fail to parse when containing some special characters. This would cause a panic which would crash the SurrealDB server, leading to denial of service. This issue only affects the SurrealDB binary; it...

Vulnerable Range: 0 -> 1.1.0
Fix Version: 1.1.0 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2024-58369 GHSA-jm4v-58r5-66hj Jan 18, 2024
MEDIUM (CVSS 6.5)

Uncaught Exception in surrealdb

Although custom parameters and functions are only supported at the database level, it was allowed to invoke those entities at the root or namespace level. This would cause a panic which would crash the SurrealDB server, leading to denial of service. ### Impact A client that ...

Vulnerable Range: 0 -> 1.1.1
Fix Version: 1.1.1 (Read Notes →)
Official Advisory Source ↗
🛡️ CVE-2023-54366 GHSA-x5fr-7hhj-34j3 Dec 15, 2023
HIGH (CVSS 8.8)

SurrealDB: Full Table Permissions by Default

Default table permissions in SurrealDB were `FULL` instead of `NONE`. This would lead to tables having `FULL` permissions for `SELECT`, `CREATE`, `UPDATE` and `DELETE` unless some other permissions were specified via the `PERMISSIONS` clause. We have decided to treat this beh...

Vulnerable Range: 0 -> 1.0.1
Fix Version: 1.0.1 (Read Notes →)
Official Advisory Source ↗