Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-6vg3-hgrw-p5gf

GHSA-6vg3-hgrw-p5gf: SurrealDB has an Authorization Bypass via Composite Record-id Paths

July 1, 2026

An authenticated user could bypass permission rules that gated access on parts of a record’s id — most commonly tenant-isolation rules of the form PERMISSIONS FOR select WHERE id.tenant = $auth.id.tenant. The same defect also let UNIQUE constraints defined on parts of an id admit duplicate entries.

When a query referenced part of a composite record id (id.tenant, id.uid, …), SurrealDB read the value from the record’s editable body fields instead of from the immutable id key. Because the body is editable but the id is fixed at creation, an attacker with write access could set the body field to any value and have permission checks read that spoofed value.

References

  • github.com/advisories/GHSA-6vg3-hgrw-p5gf
  • github.com/surrealdb/surrealdb/commit/1fcb19040bfffba92b3f69edb9b707d469e0027b
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-6vg3-hgrw-p5gf

Code Behaviors & Features

Detect and mitigate GHSA-6vg3-hgrw-p5gf 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.0

Fixed versions

  • 3.1.0

Solution

Upgrade to version 3.1.0 or above.

Impact 5.4 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-639: Authorization Bypass Through User-Controlled Key
  • CWE-863: Incorrect Authorization

Source file

cargo/surrealdb/GHSA-6vg3-hgrw-p5gf.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Mon, 13 Jul 2026 00:18:56 +0000.