5.3medium
SurrealDB 3.1.0 before 3.1.5 Field Permission Bypass via Traversal
- Severity
- 5.3medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.20% (higher than 11% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-hv6h-hc26-q48p
Description
SurrealDB versions 3.1.0 before 3.1.5 fail to enforce field-level SELECT permissions when records are accessed through graph-edge or back-reference traversals. Attackers with table-level SELECT access can read field values hidden by field-level permissions by materializing records through graph traversals instead of direct table scans.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| surrealdb surrealdb | from 3.1.0 before 3.1.5 Not affected: 3.1.5 | CVE List, NVD |
| surrealdb (crates.io) | from 3.1.0 before 3.1.5 | GitHub Advisory Database |
All scores
| VulnCheck | 5.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| VulnCheck | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
SurrealDB versions 3.1.0 before 3.1.5 fail to enforce field-level SELECT permissions when records are accessed through graph-edge or back-reference traversals. Attackers with table-level SELECT access can read field values hidden by field-level permissions by materializing records through graph traversals instead of direct table scans.
GitHub Advisory Database
A record user could read field values hidden from them by field-level SELECT permissions by reaching the records through a graph-edge (->) or back-reference (<~) traversal instead of a direct SELECT.
When a table was readable at the table level but carried a field hidden by a field-level permission (DEFINE FIELD secret ON knows PERMISSIONS FOR select NONE), a direct SELECT * FROM knows hid secret — but reaching the same records through a traversal that yields full objects — person:bob->(SELECT * FROM knows), person:bob<~(SELECT * FROM comment), or a projected target vertex ->knows->(SELECT * FROM person) — returned it intact.
The root cause: the shared resolve_record_batch helper used by GraphEdgeScan (FullEdge) and ReferenceScan (FullRecord) enforced only the table-level SELECT permission and pushed raw record data, never running the field-level filtering (build_field_state / filter_fields_by_permission) that ordinary table scans and fetch_record apply.
Impact
A record user can read the values of fields hidden by field-level SELECT permissions, on tables they already hold table-level SELECT on, by materialising the records through a graph-edge, back-reference, or target-vertex traversal — recovering the values directly, for every record the traversal returns.
The disclosure is confined to the field-permission layer: it grants no unauthorised cross-table, cross-record, or cross-namespace/database access. The table's own SELECT permission — including any row-level WHERE predicate — is still enforced, so the caller only reaches records they were already entitled to read; only the per-field SELECT filtering within those records is skipped. Root and record-owner sessions are unaffected, and data cannot be modified (confidentiality only).
Table-level enforcement on these traversals landed in 3.1.0 (the fix for GHSA-vjjx-rfw4-rmfc); releases before 3.1.0 additionally exposed whole records on tables the caller could not read, and are covered by that advisory.
Patches
resolve_record_batch (the shared helper that materialises full records for graph and reference traversals) now applies field-level SELECT permissions and read-time COMPUTED fields to each record, matching the regular table-scan and fetch_record paths.
Versions 3.1.5 and later are not affected.
Workarounds
- Force the unaffected legacy executor with
--planner-strategy compute-only(envSURREAL_PLANNER_STRATEGY). - Do not rely on field-level SELECT permissions to hide values on tables reachable as a graph edge, reference target, or traversal vertex; restrict at the table level instead.
- Use namespace / database isolation as the primary boundary where feasible.
Resources
- SurrealQL Documentation — DEFINE FIELD
- SurrealQL Documentation — DEFINE TABLE … PERMISSIONS
- SurrealQL Documentation — Graph relationships
fix(exec): apply field-level SELECT permissions + computed fields when graph/reference traversals materialize full records
References
| https://github.com/surrealdb/surrealdb/security/advisories/GHSA-hv6h-hc26-q48p | mitigation, vendor-advisory, web | |
| https://www.vulncheck.com/advisories/surrealdb-before-field-permission-bypass-via-traversal | third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-63738 | advisory | |
| https://github.com/surrealdb/surrealdb | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-63738 changed 2026-07-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hv6h-hc26-q48p changed 2026-09-04 | CC-BY-4.0 |
| NVD | CVE-2026-63738 changed 2026-07-22 | Public domain |