Description
SurrealDB before 1.5.4 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.
Published: 2026-07-18
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises because SurrealDB does not sufficiently validate the owner of a user record when a scope user switches databases using the USE clause or the use method. As a result, an attacker who already holds an authenticated session can impersonate another user in a different database if both databases contain a user record with the same identifier. This allows the attacker to perform any action that the impersonated user is permitted to do, such as reading, modifying, or deleting data. The flaw is a classic authentication bypass, classified as CWE-287, and enables unauthorized access to data that should be protected by the $auth parameter.

Affected Systems

This issue affects SurrealDB deployments running any version earlier than 1.5.4. The product is the SurrealDB database engine (surrealdb:surrealdb), and the vulnerability manifests in environments where a user record with a matching identifier exists across multiple databases.

Risk and Exploitability

The CVSS score of 5.3 denotes moderate severity, while the EPSS score of less than 1% indicates a low probability of exploitation in the wild. The vulnerability is not listed in CISA’s KEV catalog. Exploitation requires an attacker to first acquire a valid authenticated session on the SurrealDB instance, then issue a USE directive that points to a database containing a user record with the same identifier. Once the context switches, the attacker can act as that user, thereby accessing functionality that depends solely on the $auth token. The attack vector is therefore limited to authenticated users and does not involve remote code execution or privilege escalation from an unauthenticated state.

Generated by OpenCVE AI on July 30, 2026 at 23:07 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade SurrealDB to version 1.5.4 or newer to apply the authentication validation fix.
  • Ensure that each user identifier is unique across databases, or otherwise adjust the permission model so that the $auth value alone does not grant cross-database access.
  • Restrict or disable the USE clause (or database switching) for non-trusted roles if possible, or apply network segmentation to limit exposure of the database service.

Generated by OpenCVE AI on July 30, 2026 at 23:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 28 Jul 2026 02:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Surrealdb
Surrealdb surrealdb
Vendors & Products Surrealdb
Surrealdb surrealdb

Mon, 20 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sat, 18 Jul 2026 13:45:00 +0000

Type Values Removed Values Added
Description SurrealDB before 1.5.4 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.
Title SurrealDB before 1.5.4 Authentication Bypass via Database Switch
Weaknesses CWE-287
References
Metrics cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L'}

cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N'}


Subscriptions

Surrealdb Surrealdb
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-28T01:47:50.565Z

Reserved: 2026-07-18T12:40:52.916Z

Link: CVE-2024-58363

cve-icon Vulnrichment

Updated: 2026-07-20T19:23:38.667Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T23:15:06Z

Weaknesses