Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-8rw6-p7m8-63jp

GHSA-8rw6-p7m8-63jp: SurrealDB: Array element-level (field.*) SELECT permissions leak denied elements to record users

August 14, 2026

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.

References

  • github.com/advisories/GHSA-8rw6-p7m8-63jp
  • github.com/surrealdb/surrealdb/commit/8f89b260bb9692e5b0d58930793d482a8207eedc
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-8rw6-p7m8-63jp

Code Behaviors & Features

Detect and mitigate GHSA-8rw6-p7m8-63jp with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.1.4

Fixed versions

  • 3.1.4

Solution

Upgrade to version 3.1.4 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-863: Incorrect Authorization

Source file

cargo/surrealdb/GHSA-8rw6-p7m8-63jp.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 15 Aug 2026 00:25:25 +0000.