{"id":"GHSA-6wqw-vhfr-9999","revision":"7286cbdd15d44c3d9bd65b55fa26ab74","records":[{"revision":"7286cbdd15d44c3d9bd65b55fa26ab74","observedAt":"2026-11-04T03:59:15.952+00:00","statement":{"source":"osv","id":"GHSA-6wqw-vhfr-9999","aliases":["CVE-2026-63749"],"title":"SurrealDB: Authenticated subscribers can read records hidden by SELECT permissions via LIVE subscriptions","description":"A record user could read records the table's SELECT permission expression should have hidden, when that expression referenced `$value`, `$before`, `$after`, or `$event`. Binding a chosen value to that name before registering a `LIVE SELECT` caused notifications to evaluate the permission against the attacker's input instead of the real document.\n\n### Impact\n\nA record user binds a value to `$value`, `$before`, `$after`, or `$event` (e.g. `LET $value = [$auth.id]`) and registers `LIVE SELECT * FROM person`. The captured value shadows the real document at notification time, so a SELECT permission like `WHERE $auth.id.id() IN $value` passes for every record on the table — the subscriber receives notifications for records they should not see.\n\nRead-only impact, bounded to one table. Permission expressions that reference only field names, `$auth`, or `$session` are unaffected.\n\n### Patches\n\nA patch has been introduced that re-orders the LIVE notification parameter binding so captured user variables are added first and the trusted document-context and session parameters are added last.\n\n- Versions 3.1.0 and later are not affected by this issue.\n\n### Workarounds\n\nAffected users who are unable to update should avoid table-`PERMISSIONS` and LIVE `WHERE` expressions that read user-named variables (`$value`, `$before`, `$after`, `$event`) without also gating on a system-derived field such as the record id.","state":0,"publishedAt":"2026-07-01T20:20:00+00:00","modifiedAt":"2026-11-04T02:56:07.5374415+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-6wqw-vhfr-9999","https://github.com/surrealdb/surrealdb/commit/6bcc55c9c0494a0d4d36821019b54459f7162af7","https://github.com/orgs/surrealdb/discussions/101","https://github.com/surrealdb/surrealdb"],"sourceUrl":"https://github.com/advisories/GHSA-6wqw-vhfr-9999","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-6wqw-vhfr-9999","identifiers":["GHSA-6wqw-vhfr-9999","CVE-2026-63749"]},"retained":false,"historicalAffected":[]}],"coverage":[]}