CVE-2024-58362 — Untrusted Query Object Evaluation in surrealdb-core
Untrusted Query Object Evaluation in RPC API
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.64%). Schedule for your next planned update.
Does your project use an affected surrealdb-core version?
Paste your Cargo.lock to check it for CVE-2024-58362 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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, including an object representing a subquery. For this to materialize, this object would need to be encoded using the bincode serialization format instead of the default JSON serialization format or the additionally supported CBOR serialization format.
If a binary object containing a subquery were to be provided in this way, that subquery would be computed while executing the SIGNIN and SIGNUP queries defined by the database owner while defining a record access method. Since those queries are executed under a system user session with the editor role, an unauthenticated attacker may be able to leverage this behavior to select, create, update and delete non-IAM resources with permissions of a system user with the editor role.
Impact
If a record access method was defined with a SIGNIN or a SIGNUP query and the SurrealDB RPC API was exposed to untrusted users, an attacker could be able to craft a binary object containing a subquery to provide in place of valid credentials when calling the signin and signup operations via the RPC API with the bincode serialization format. The attacker could use that subquery to select, create, update and delete resources in SurrealDB, but they would not be able to directly view the results of the query. This method cannot be used to create, update or delete IAM resources, as access to those kind of resources requires the owner role.
Patches
Objects provided as variables to the sign in and sign up methods are now recursively validated to ensure that they do not contain any non-computed values, which include subqueries and other data types that could potentially result in query execution.
- Version 1.5.5 and later are not affected by this issue.
- Version 2.0.0-beta.3 and later are not affected by this issue.
Workarounds
Users unable to update may want to disallow access to the SurrealDB RPC API using the affected binary serialization formats by conservatively allowing only requests to the /rpc endpoint of the SurrealDB HTTP server with the application/json content type. If the RPC API is not used at all or only used by trusted clients, disallowing or restricting access to the /rpc endpoint of the SurrealDB HTTP server will also prevent exploitation. Alternatively, if filtering HTTP requests is not possible, record access methods that define SIGNIN and SIGNUP clauses may be temporarily removed to completely prevent potential attacks leveraging this issue.
References
Advisory Timeline
- First published September 11, 2024 (807 days ago).
- Last revised July 19, 2026 — 675 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p surrealdb-core --precise 1.5.2
cargo update -p surrealdb --precise 1.5.5
cargo update -p surrealdb --precise 2.0.0-beta.3
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: crates.io (2).
| Package | Fixed In |
|---|---|
| surrealdb-core crates.io · Affected: All versions | 1.5.2 |
| surrealdb crates.io · Affected: All versions | 1.5.5 |
| surrealdb crates.io · Affected: All versions | 2.0.0-beta.3 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-75
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-64f8-pjgr-9wmrWEB
- https://github.com/surrealdb/surrealdb/commit/b7583a653a2c495a60630dffd663f506426db330WEB
- https://github.com/surrealdb/surrealdb/commit/eab7ef5354168d4039f7f7b77042c99a52f770a6WEB
- https://github.com/surrealdb/surrealdbPACKAGE
- https://surrealdb.com/docs/surrealdb/integration/rpc#signinWEB
- https://surrealdb.com/docs/surrealdb/integration/rpc#signupWEB
- https://surrealdb.com/docs/surrealdb/security/authentication#record-usersWEB
Frequently Asked Questions
- What is CVE-2024-58362?
- Untrusted Query Object Evaluation in RPC API. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2024-58362?
- CVE-2024-58362 affects surrealdb-core and surrealdb. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-58362 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 45% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-63757HIGH
SurrealDB: HTTP /rpc `sessions` method leaks attached session UUIDs, enabling full session hijack by anonymous callers
- CVE-2024-58367HIGH
SurrealDB: Improper Authorization in Select Permissions
- CVE-2024-58361HIGH
SurrealDB has an Uncaught Exception Handling Parsing Errors on Empty Strings
- CVE-2024-58365MEDIUM
Uncaught Exception in Macro Expecting Native Function to Exist
- CVE-2025-11060MEDIUM
SurrealDB is Vulnerable to Unauthorized Data Exposure via LIVE Query Subscriptions
- CVE-2024-58363MEDIUM
SurrealDB vulnerable to Improper Authentication when Changing Databases as Scope User
- CVE-2024-58357MEDIUM
SurrealDB has an Uncaught Exception in Function Generating Random Time
- CVE-2024-58359MEDIUM
SurrealDB has an Uncaught Exception Sorting Tables by Random Order