Vulnerability GHSA-6wqw-vhfr-9999

Medium Risk
MEDIUM RISK
CVSS Score: 4.3
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
4 months ago
July 01, 2026 at 08:20 PM UTC
SurrealDB: Authenticated subscribers can read records hidden by SELECT permissions via LIVE subscriptions
1.0.0-beta.1 - 1.0.0-beta.9 and 1.0.0-beta.9+20230402 - 3.1.0-beta.3
1.0.0-beta.1 - 1.0.0-beta.9 and 1.0.0-beta.9+20230402 - 3.1.0-beta.3

Summary

SurrealDB: Authenticated subscribers can read records hidden by SELECT permissions via LIVE subscriptions

Details

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.

Impact

A 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.

Read-only impact, bounded to one table. Permission expressions that reference only field names, $auth, or $session are unaffected.

Patches

A 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.

  • Versions 3.1.0 and later are not affected by this issue.

Workarounds

Affected 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.

Related Vulnerabilities

Other vulnerabilities affecting the same packages

View all vulnerabilities for these packages

Impacted packages

Timeline

Published
4 months ago
July 01, 2026 at 08:20 PM UTC
Fixed (3.1.0)
5 months ago
May 26, 2026 at 02:12 PM UTC
Last Modified
7 hours ago
November 04, 2026 at 02:56 AM UTC