GHSA-gcwr-5mrf-fvch: SurrealDB: Authorization Bypass in KILL Statement Allows Termination of Other Users' Live Queries
The KILL statement is used to terminate LIVE SELECT subscriptions that capture real-time changes to data within a table. The KILL statement implementation in core/src/expr/statements/kill.rs verifies that the requesting user has database-level access, but does not verify that the requesting user is the owner of the live query being terminated.
After passing the valid_for_db() check, the KILL statement resolves the live query UUID, looks up the corresponding live query entry, and immediately deletes it without comparing the requesting user’s identity against the live query owner. This allows any authenticated user with database-level access to terminate any live query in that database, regardless of who created it.
The affected user’s real-time subscription silently stops receiving updates with no notification that the live query was terminated. The same attack works across privilege levels: a low-privilege record-scoped user can terminate a root user’s monitoring live queries.
This issue was discovered and patched during a code audit and penetration test of SurrealDB by cure53, the severity defined within cure53’s preliminary finding is Medium, matched by our CVSS v3.1 assessment.
References
Code Behaviors & Features
Detect and mitigate GHSA-gcwr-5mrf-fvch 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 →