Description
SurrealDB versions before 3.1.0 fail to validate DEFINE NAMESPACE or DEFINE DATABASE permissions when processing USE NS and USE DB statements. Unauthenticated attackers can create arbitrary namespaces and databases by issuing USE commands, bypassing authorization checks in the RPC use method and SurrealQL executor.
Published: 2026-07-20
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

SurrealDB releases before 3.1.0 contain a flaw in the permission logic for the USE NS and USE DB statements. When the server processes these commands it does not enforce DEFINE NAMESPACE or DEFINE DATABASE permissions. An attacker who sends requests to the RPC interface without authenticating can therefore issue USE commands that create arbitrary namespaces and databases. This bypasses the authentication and authorization checks that would normally prevent such operations, allowing the attacker to create isolated data stores and subsequently perform queries or further modifications. The flaw is captured by the CWE‑862 "Incorrect Authorization" weakness.

Affected Systems

All publicly accessible instances of SurrealDB produced by the vendor surrealdb:surrealdb and running a version earlier than 3.1.0 are impacted. The issue is limited to the SurrealQL executor and the underlying RPC use mechanism for namespace and database selection. Clients that have any RPC connectivity to a vulnerable instance could exploit this vulnerability.

Risk and Exploitability

The measured CVSS score of 6.9 marks this bug as a moderate‑severity vulnerability. Its EPSS score is reported as less than 1%, indicating a very low yet non‑zero probability of exploitation. The issue is not listed in the CISA KEV catalog. Based on the description, the most likely attack vector is a remote, unauthenticated client that can connect to the RPC or SurrealQL endpoint; if network access to these interfaces is unenforced, exploitation is essentially trivial. The vulnerability does not depend on privileged system access or local execution, making it an easily launchable remote exploitation scenario.

Generated by OpenCVE AI on July 30, 2026 at 19:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade SurrealDB to version 3.1.0 or later, which restores proper permission checks for USE NS and USE DB commands.
  • Until the upgrade can happen, restrict access to the RPC interface so that only trusted, authenticated clients can reach it. Use network ACLs or firewall rules to limit the RPC port, or enable TLS client authentication so that only clients with valid certificates can connect.
  • If the server configuration supports disabling the USE commands, set the relevant option (e.g., "allow_use_commands": false) or move the RPC endpoint to an isolated network segment so that any attempt to issue USE statements is blocked by the perimeter.

Generated by OpenCVE AI on July 30, 2026 at 19:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 28 Jul 2026 01: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
Metrics ssvc

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


Mon, 20 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Description SurrealDB versions before 3.1.0 fail to validate DEFINE NAMESPACE or DEFINE DATABASE permissions when processing USE NS and USE DB statements. Unauthenticated attackers can create arbitrary namespaces and databases by issuing USE commands, bypassing authorization checks in the RPC use method and SurrealQL executor.
Title SurrealDB before 3.1.0 Authentication Bypass via USE statement
Weaknesses CWE-862
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/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:05:37.401Z

Reserved: 2026-07-18T12:19:06.904Z

Link: CVE-2026-63741

cve-icon Vulnrichment

Updated: 2026-07-23T19:10:56.648Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T19:45:06Z

Weaknesses