GHSA-6vg3-hgrw-p5gf: SurrealDB has an Authorization Bypass via Composite Record-id Paths
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
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 →