highCVSS 8.1Vulnerability

CVE-2026-63735

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

Properties

summary
SurrealDB: Custom API route lets authenticated callers override namespace/database scope via URL path
severity
high
epss_score
0.00367
cvss_score
8.1
ghsa_published
2026-09-04T20:07:07Z
source_url
https://github.com/advisories/GHSA-848m-r628-vrxw
ghsa_updated
2026-09-04T20:07:08Z
ghsa_id
GHSA-848m-r628-vrxw
cve_id
CVE-2026-63735
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
is_ghsa_only
false
epss_percentile
0.29781

Related Entities (6)

ENRICHED_BY (1)

[Source]FIRST EPSS

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]rust/surrealdb

AFFECTS (1)

[Software]rust/surrealdb

HAS_WEAKNESS (2)

[Weakness]Missing Authorization
[Weakness]Authorization Bypass Through User-Controlled Key

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-63735 (CVSS 8.1) — Ninja Signal Threat Intelligence | Ninja Signal