SurrealDB: Cross-tenant access via USE statement
Summary
SurrealDB before 3.3.0 lets a user with valid credentials for one namespace, database or record scope switch to another tenant on the same instance with the SurrealQL USE statement. From there the attacker can read, create, update and delete rows in tables whose PERMISSIONS allow it, such as PERMISSIONS FULL. Anonymous access is not enough, and tables whose PERMISSIONS deny the operation stay protected.
Affected
- SurrealDB versions before 3.3.0
- Vendor advisory: all versions below 3.3.0 are affected
Fixed in
- Upgrade to SurrealDB 3.3.0 or later. The vendor states that the fix is included and enabled by default in 3.3.0.
Workaround
- No vendor workaround is documented.
- On shared instances, isolate tenants with separate deployments instead of namespace or database boundaries.
- Until the upgrade, issue namespace, database and record credentials only to parties trusted with every tenant on the instance.
- Use PERMISSIONS WHERE clauses that check the caller's identity (for example $auth) instead of PERMISSIONS FULL. This reduces exposure but does not close the boundary.
Exploitation
- No known exploitation in the wild according to the sources reviewed. CISA KEV status was not verified.
- EPSS 0.00258 (low predicted exploitation probability).
- CISA SSVC: exploitation none, not automatable, total technical impact.
- Public proof-of-concept code: unknown.
Our recommendation
- Upgrade all SurrealDB instances to 3.3.0 or later. The same fix also covers related advisories GHSA-vx2p-7hhm-wv62, GHSA-w5v9-jc5f-5rmc and GHSA-3vw5-j55x-486h.
- Review which accounts hold namespace, database or record access on shared instances and remove unneeded ones.
- Review PERMISSIONS FULL and other permissive table rules, and replace them with identity-based checks.
- Check whether SurrealDB endpoints (HTTP /sql, WebSocket /rpc) are reachable from outside the network and restrict access.
- Monitor logs for unexpected USE statements or namespace switches.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-2v9j-645m-pcrq (vendor) github.com
- VulnCheck advisory www.vulncheck.com
- SurrealDB 3.3 release notes surrealdb.com
- GitHub Security Advisory GHSA-w5v9-jc5f-5rmc github.com
- GitHub Security Advisory GHSA-3vw5-j55x-486h github.com
- NixOS tracker issue 573514 github.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 08:42.
Original description (NVD)
SurrealDB before 3.3.0 allows cross-tenant access because the SurrealQL USE statement switches a session to any namespace/database without checking that the caller's authenticated level covers it. Authenticated namespace, database, or record users can switch to another tenant and read, create, update, or delete rows in tables whose PERMISSIONS allow it, such as PERMISSIONS FULL.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
