CVE-2024-58362: SurrealDB before 1.5.5 Query Injection via RPC API
SurrealDB before 1.5.5 (and 2.0.0-beta before 2.0.0-beta.3) accepts an arbitrary object in the signin and signup operations of the RPC API without recursively validating it for non-computed values. When a record access method defines a SIGNIN or SIGNUP query and the RPC API is exposed to untrusted users, an unauthenticated attacker can encode a binary object containing a subquery using the bincode serialization format and supply it in place of credentials. The subquery is then executed within the database owner's SIGNIN/SIGNUP query under a system user session with the editor role, allowing the attacker to select, create, update, and delete non-IAM resources (though not view the query results directly, and not affect IAM resources, which require the owner role).
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
SurrealDBto a version that resolves this vulnerability.Fixed in 1.5.5 - Upgrade
Upgrade
SurrealDBto a version that resolves this vulnerability.Fixed in 2.0.0-beta.3 - Compensating control
If the RPC API is exposed to untrusted users, do not expose it; restrict network access to the RPC API so only trusted users/systems can reach endpoints used for SIGNIN/SIGNUP.
Event History
Frequently Asked Questions
What is the severity of CVE-2024-58362?
The severity of CVE-2024-58362 is rated high with a CVSS score of 8.8.
How do I fix CVE-2024-58362?
To fix CVE-2024-58362, update SurrealDB to version 1.5.5 or later, or 2.0.0-beta to version 2.0.0-beta.3 or later.
What are the risks associated with CVE-2024-58362?
CVE-2024-58362 poses a risk of query injection via the RPC API, which could allow an untrusted user to access or manipulate data.
What versions of SurrealDB are affected by CVE-2024-58362?
Versions of SurrealDB prior to 1.5.5 and 2.0.0-beta before 2.0.0-beta.3 are affected by CVE-2024-58362.
What types of operations are vulnerable in CVE-2024-58362?
The signin and signup operations of the RPC API are vulnerable in CVE-2024-58362.