Skip to content
DayZeroHub
High CVSS 8.7CVE-2026-134309

SurrealDB: Authorization Bypass via FOR Loop Variable Shadowing (CVE-2026-134309)

surrealdb surrealdb

Summary

SurrealDB from version 1.0.0 up to but not including 4.0.0 contains an authorization bypass that lets authenticated users circumvent table permissions. The CVSS 4.0 score is 8.7 (high severity).

What happened

According to the source description, an authenticated user can shadow the protected $access, $auth and $token variables by binding them as FOR loop variables. By wrapping queries in nested FOR loops with forged values, table permission predicates can be satisfied, enabling unauthorized reads, modifications or deletions as a VIEWER. The weakness is classified as CWE-863 (incorrect authorization).

Why it matters

The flaw allows an authenticated user to access or alter data beyond what their table permissions should allow. The score is CVSS 4.0 8.7 (vector CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N), assigned by CNA:VulnCheck, with high severity. The source does not indicate active exploitation: it is not listed in CISA's KEV catalog. Nor is there any indication supporting a zero-day characterization.

Affected products and versions

surrealdb (vendor: surrealdb): versions >= 1.0.0, < 4.0.0. Version 4.0.0 is listed as unaffected.

ProductVersionsFixed in
surrealdb surrealdb>= 1.0.0, < 4.0.0—
surrealdb surrealdb4.0.04.0.0

Action recommended by the source

The source lists version 4.0.0 as unaffected (fixed). References include the vendor advisory (GHSA-ffvm-mqh3-7986, on surrealdb's GitHub) and a VulnCheck advisory. The source does not state other mitigations.

Fixed in: 4.0.0

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-863

Relevant change history

  1. Published

    Advisory published.

Summary written with AI assistance from the source data. See the sources and references for complete information. View sources