SurrealDB before 1.5.5 Query Injection via RPC API
surrealdb
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| surrealdb crates.io |
|
|
| surrealdb-core crates.io |
|
|
surrealdb
| Product | Affected | Fixed in |
|---|---|---|
| surrealdb crates.io |
|
|
| surrealdb-core crates.io |
|
|
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).
From the CVE record · VulnCheck
SurrealDB's RPC signin and signup operations do not recursively validate supplied objects. If the RPC API is exposed to untrusted users and a record access method defines a SIGNIN or SIGNUP query, an unauthenticated attacker can submit a binary object containing a subquery in place of credentials. The subquery runs with the editor role and can select, create, update, or delete non-IAM resources, but the attacker cannot directly view its results.
Check deployments using the surrealdb crate before 1.5.5 or from 2.0.0-beta.1 to before 2.0.0-beta.3, or the surrealdb-core crate before 1.5.2.