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.
| Product | Versions | Fixed in |
|---|---|---|
| surrealdb surrealdb | >= 1.0.0, < 4.0.0 | — |
| surrealdb surrealdb | 4.0.0 | 4.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
Sources and references
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ffvm-mqh3-7986 — CVE Program
- https://www.vulncheck.com/advisories/surrealdb-1.0.0-before-4.0.0-authorization-bypass-via-for-loop-variable-shadowing — CVE Program
Weaknesses (CWE): CWE-863
Relevant change history
Published
Advisory published.