Duplicate Advisory: SurrealDB: Scraping a TABLE with no available PERMISSIONS to current auth level
Description
SurrealDB versions before 3.1.0 contain a vulnerability where user-supplied WHERE clauses in various query statements are evaluated against full record data before permission checks are enforced. This flaw allows authenticated users to bypass table-level permissions and read the full contents of any table within their current database. Exploitation is easier when scripting is enabled but can also occur through other SurrealQL features. The issue does not affect cross-namespace or cross-database boundaries.
CVSS v3.1
Score 6.5medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
SurrealDB prior to version 3.1.0 improperly orders evaluation of user-supplied WHERE clauses in SELECT and update-related statements, applying them against full record data before enforcing PERMISSIONS FOR SELECT WHERE restrictions. This allows authenticated users, including those with limited Record and Scope user privileges, to bypass table-level permission checks and access full table contents within the database they are authenticated against. Exploitation is facilitated by scripting functions when enabled, but also possible through SurrealQL's THROW statement and timing-based side channels. The vulnerability is confined to the current database context and does not cross namespace or database isolation boundaries.
Potential Impact
An authenticated user with limited permissions can read the full contents of any table in the database they have access to, bypassing intended table-level permission restrictions. This results in unauthorized data disclosure (confidentiality impact). There is no impact on data integrity or availability. The vulnerability affects only the current database and does not allow access across namespaces or other databases.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no patch or official fix information is provided, users should monitor vendor communications for updates. Until a fix is available, consider disabling scripting functions (--allow-scripting) to reduce exploitation risk, as scripting facilitates more direct exfiltration. Restrict authenticated user privileges to the minimum necessary to limit potential impact.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-4f9v-jpx9-mjvw
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["crates.io"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a9c2646acd9273b49fc9c8e
Added to database: 09/05/2026, 14:25:10 UTC
Last enriched: 09/07/2026, 10:07:32 UTC
Last updated: 10/01/2026, 23:09:39 UTC
Views: 21
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.