Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

SurrealDB: Custom API route lets authenticated callers override namespace/database scope via URL path (CVE-2026-63735)

0
High
Published: 09/04/2026 (09/04/2026, 20:07:07 UTC)
Source: GCVE Database
Product: surrealdb

Description

An authenticated user scoped to one namespace/database could invoke a custom API (`DEFINE API`) belonging to a different namespace/database, reaching another tenant's endpoint. The route `/api/{namespace}/{database}/{endpoint}` took the namespace and database from the URL and applied them to the caller's session before the endpoint was looked up or run, without checking that the caller's authenticated scope covered them. Because a custom API handler runs with permissions disabled (definer's rights), the endpoint's own `PERMISSIONS` clause was the only gate — open to everyone for a `PERMISSIONS FULL` endpoint. The `api::invoke()` function was affected the same way, resolving against the session's selected namespace/database (settable via the `surreal-ns` / `surreal-db` headers or `USE`). ### Impact What an attacker **can** do: - With valid credentials for any one namespace/database (a `VIEWER` is enough), invoke a custom API in another namespace/database by naming the victim scope in the URL. - Read data that endpoint returns — including from `PERMISSIONS NONE` tables, since the handler runs with permissions disabled — or trigger any writes and side effects it performs. What it **can't** do: - Reach a scope without valid credentials for some namespace/database on the instance; this is not an unauthenticated bypass. - Affect single-tenant deployments, or any deployment where callers already hold instance-wide (root) scope. ### Patches The namespace/database is now validated against the caller's authenticated level — which the request cannot change — before the endpoint is resolved or run. A target scope outside that level is rejected with `403 Forbidden`, both at the HTTP entry point and at the dispatch step shared with `api::invoke()`. Root reaches any scope; namespace principals their namespace; database and record principals their exact namespace/database; anonymous callers remain governed by the endpoint's `PERMISSIONS`. - Versions 3.2.0 and later are not affected by this issue. ### Workarounds Users unable to patch should consider the following workarounds: - Disable the custom API HTTP route via capabilities where it is not required. - Treat separate deployments, not namespace/database boundaries, as the tenant isolation boundary on shared instances. - Prefer a `PERMISSIONS WHERE` clause that checks the authenticated identity over `PERMISSIONS FULL` (reduces exposure but does not restore the boundary). ### Resources - [SurrealQL Documentation — DEFINE API](https://surrealdb.com/docs/surrealql/statements/define/api) - [SurrealDB Documentation — Capabilities](https://surrealdb.com/docs/surrealdb/security/capabilities) - `fix(core/api): reject cross-tenant custom API access` (included in SurrealDB 3.2.0) ### Acknowledgements SurrealDB thanks [sondt99](https://github.com/sondt99) for reporting this issue.

CVSS v3.1

Score 8.1high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Affected software

crates.ioghsa
surrealdb
Affected versions
<3.2.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-848m-r628-vrxw
Osv Schema Version
1.4.0
Aliases
["CVE-2026-63735"]
Ecosystems
["crates.io"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a9c2648acd9273b49fc9e63

Added to database: 09/05/2026, 14:25:12 UTC

Last updated: 09/05/2026, 19:22:07 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses