SurrealDB before 1.5.4 Authentication Bypass via Database Switch
surrealdb · surrealdb-core
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| surrealdb crates.io |
|
|
| surrealdb-core crates.io |
|
|
surrealdb · surrealdb-core
| Product | Affected | Fixed in |
|---|---|---|
| surrealdb crates.io |
|
|
| surrealdb-core crates.io |
|
|
SurrealDB before 1.5.4 and 2.0.0-alpha.1 before 2.0.0-alpha.6 fails to properly validate authentication when a scope user switches databases using the USE clause or use method. Attackers with an authenticated session can impersonate an unrelated user in a different database if a user record with an identical identifier exists, allowing unauthorized actions if permissions rely solely on the $auth parameter.
From the CVE record · VulnCheck
SurrealDB does not properly validate authentication when a scope user switches databases using the USE clause or use method. An attacker with an authenticated session can impersonate an unrelated user in another database if a user record has the same identifier, allowing unauthorized actions when permissions rely solely on $auth. No user interaction is described.
Check installations using the surrealdb crate before 1.5.4 or from 2.0.0-alpha.1 through versions before 2.0.0-alpha.6, or the surrealdb-core crate before 1.5.1.