Summary
A LIVE SELECT subscription records the user's auth state ($auth, $token, $session, $access) when it is registered, and the server uses that recorded state to evaluate the table- and row-level PERMISSIONS clauses for every subsequent notification. The recorded state is never refreshed.
When something changes the user's effective auth state, the originating session is invalidated, the session's TTL expires, or the user signs in, signs up, or authenticates as a different identity on the same connection, the subscription keeps delivering notifications under the old, stale auth state, and the PERMISSIONS that should now apply to the connection are never consulted.
Workarounds
For unpatched versions, clients should call reset() (which tears down all LIVE queries owned by the session) or kill each outstanding live query ID before signing out, signing in as a different identity, or signing up on an existing connection. There is no client-side workaround for the TTL-expiry leg; deployments concerned about it should restrict DURATION FOR SESSION on access methods that have permission to register LIVE queries.
Impact
A user whose session has been revoked, expired, signed out of, or re-authenticated on the same connection continues to receive real-time notifications evaluated against the prior principal. The attacker does not gain access to new resources, only continued access to resources the prior principal was already permitted to read, but that continued access persists past the point the principal change should have ended it, and persists indefinitely until the originating connection is closed.
This is confidentiality-only: the dispatcher does not enable writes evaluated under the stranded principal.
GHSA-4M82-P8CX-F94J has a CVSS score of 4.3 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.1.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
invalidate()and TTL expiry,RpcProtocol::invalidatenow callscleanup_lqs(session_id)after clearing the session, dropping every LIVE owned by the now-invalidated session. The notification dispatcher additionally reads the originating session'sexpand skips delivery once it has passed, closing the TTL-expiry leg without requiring theSessionobject to remain in memory.- Principal change on
signin/signup/authenticate/refresh, each of these RPC methods now snapshots the session's auth principal (Auth::id()+Auth::level()) before mutating the session and, if the principal has changed after the operation, callscleanup_lqs(session_id). Token refresh against the same identity is therefore preserved; identity change tears stranded subscriptions down.
Versions 3.1.0 and later are not affected by this issue.
Frequently Asked Questions
- What is GHSA-4M82-P8CX-F94J? GHSA-4M82-P8CX-F94J is a medium-severity security vulnerability in surrealdb (rust), affecting versions < 3.1.0. It is fixed in 3.1.0.
- How severe is GHSA-4M82-P8CX-F94J? GHSA-4M82-P8CX-F94J has a CVSS score of 4.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of surrealdb are affected by GHSA-4M82-P8CX-F94J? surrealdb (rust) versions < 3.1.0 is affected.
- Is there a fix for GHSA-4M82-P8CX-F94J? Yes. GHSA-4M82-P8CX-F94J is fixed in 3.1.0. Upgrade to this version or later.
- Is GHSA-4M82-P8CX-F94J exploitable, and should I be worried? Whether GHSA-4M82-P8CX-F94J is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-4M82-P8CX-F94J is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-4M82-P8CX-F94J? Upgrade
surrealdbto 3.1.0 or later.