CVE-2024-58356

SurrealDB before 2.1.4 Permission Bypass via DEFINE TABLE OVERWRITE

Published Jul 18, 2026 CVSS 4.0 · 2.3 Low EPSS < 1% KEV · Not listed
Description
SurrealDB before 2.1.4 silently fails to overwrite table definitions when the DEFINE TABLE ... OVERWRITE clause is used on tables defined with TYPE RELATION. Because table definitions include the PERMISSIONS clause, an attempt to tighten a table's permissions via OVERWRITE does not take effect, and the administrator may incorrectly believe the change was applied. As a result, a client authorized to run queries may continue to access data in that table that the updated (but unapplied) permissions were intended to restrict.

Analysis

AI-generated

Technical impact

SurrealDB before version 2.1.4 contains a permission bypass that occurs when the DEFINE TABLE … OVERWRITE clause is used on tables defined with TYPE RELATION. The database silently ignores the permissions specified in the rewritten table definition, so an administrator who attempts to tighten access actually leaves the previous permissions in effect. Because the failure is silent, the administrator may incorrectly believe that the change has been applied, while a client authorized to run queries continues to see data that the updated permissions were meant to restrict. The weakness is an example of CWE‑276: Incorrect Privilege Assignment.

Affected Systems

The vulnerability affects the SurrealDB product suite prior to version 2.1.4. All installations using the DEFINE TABLE … OVERWRITE syntax on relational tables are potentially impacted, regardless of platform.

Risk and Exploitability

The CVSS score of 2.3 indicates a low base severity, and the EPSS score of less than 1% suggests a very low probability of exploitation in the wild at the time of analysis. The vulnerability is not listed in the CISA KEV catalog. The likely attack path requires a client that already has query privileges; the attacker would attempt to tighten permissions using an overwrite operation, misinterpret the failure, and access data they should be denied from. No network or code‑execution vector is required beyond normal authorized query access.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SurrealDB to version 2.1.4 or later to apply the fixed permission overwrite logic.
  • If an upgrade is not feasible, refrain from using DEFINE TABLE … OVERWRITE on tables of TYPE RELATION; instead modify permissions through separate statements or use ALTER TABLE if available.
  • After any permission change, verify the effective permissions by querying the table definition or performing test access to confirm that the intended restrictions are active.

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-27vq-hv74-7cqp SurrealDB has Silent Failure to Overwrite Table Definition of Relation Type
History
Type Values Removed Values Added
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'}

Type Values Removed Values Added
CPEs cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Surrealdb
Surrealdb surrealdb
Vendors & Products Surrealdb
Surrealdb surrealdb
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description SurrealDB before 2.1.4 silently fails to overwrite table definitions when the DEFINE TABLE ... OVERWRITE clause is used on tables defined with TYPE RELATION. Because table definitions include the PERMISSIONS clause, an attempt to tighten a table's permissions via OVERWRITE does not take effect, and the administrator may incorrectly believe the change was applied. As a result, a client authorized to run queries may continue to access data in that table that the updated (but unapplied) permissions were intended to restrict.
Title SurrealDB before 2.1.4 Permission Bypass via DEFINE TABLE OVERWRITE
Weaknesses CWE-276
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-276

    Incorrect Default Permissions

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 28, 2026, 1:47 AM
Reserved
Jun 8, 2026, 3:20 PM
Status
Analyzed
Published
Jul 18, 2026, 2:17 PM
Modified
Oct 27, 2026, 6:10 PM