Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-8rw6-p7m8-63jp
A SELECT permission defined on an array element (DEFINE FIELD field.* … PERMISSIONS FOR select …) is not enforced correctly for RECORD users. Instead of hiding the denied elements, the query leaks a subset of them: a deny-all returns the odd-indexed elements, and a per-element predicate keeps and drops the wrong ones.
The filter removed each denied element by index while walking the array forwards. Because removing an element shifts every later index down, each cut invalidated the indices still pending in the loop, leaving denied elements behind. Field-level permissions are enforced correctly; only the element (field.*) level is affected, and only for record users — root and record-owner sessions are not.
Impact
What an attacker can do:
- As a record (scope) user, read array elements that an element-level (
field.*) SELECT permission should hide, on any table they can already SELECT. - Recover denied elements through both a deny-all and a
WHEREpredicate — the wrong elements are selected either way.
What it can't do:
- Bypass field-level SELECT permissions, which are evaluated correctly.
- Affect root or record-owner sessions, or cross namespace/database isolation.
- Modify data, escalate privileges, or affect availability (confidentiality only).
Patches
The three permission-filtering paths (doc/reduce.rs, doc/output.rs, exec/operators/scan/pipeline.rs) now remove denied elements in reverse index order, so removing one element no longer shifts the elements still to be checked. Regression tests reproducing the issue were added.
The fix is included in SurrealDB 3.1.4.
Workarounds
- Do not rely on element-level (
field.*) permissions to hide data from record users; use field-level permissions, which are enforced correctly. - Restrict record users from selecting tables whose schema uses element-level permissions.
Resources
- DEFINE FIELD
- USERS
- DEFINE TABLE … PERMISSIONS
fix(sec): stop array element-level SELECT permissions leaking elements(commit8f89b260b)
Upload your own SBOM in CycloneDX 1.6 or higher (JSON) directly here to check your vulnerabilities.
Drag and drop some file here, or click to select
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
Probability that this vulnerability will be exploited in the wild within the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
- EUVD-2026-45911Alias
- CVE-2026-63740Alias
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard