Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

SurrealDB before 3.2.0 Authentication Bypass via Custom API

CVSS 4.0 8.6 HIGHCVSS 3.1 8.1 HIGHEUVD CVSS 4.0 8.6 CVSS 4.0 · [email protected] · Secondary 8.6 HIGHCVSS 3.1 · [email protected] · Secondary 8.1 HIGHCVSS_V3 CVSS_V4 Publisher rating HIGHCVSS_V3 Publisher rating HIGHFixed by surrealdb 3.2.0KEV status unknown

cve-program · CVE-2026-63735

Published

SurrealDB versions before 3.2.0 fail to validate namespace and database scope in custom API routes, allowing authenticated users to invoke endpoints in different namespaces/databases. Attackers with valid credentials for any namespace/database can access custom API endpoints in other tenants by specifying the target scope in the URL path, reading sensitive data or triggering unintended operations.

Read the publisher's advisory

euvd · EUVD-2026-45906

Published

SurrealDB versions before 3.2.0 fail to validate namespace and database scope in custom API routes, allowing authenticated users to invoke endpoints in different namespaces/databases. Attackers with valid credentials for any namespace/database can access custom API endpoints in other tenants by specifying the target scope in the URL path, reading sensitive data or triggering unintended operations.

Read the publisher's advisory

nvd · CVE-2026-63735

Published

SurrealDB versions before 3.2.0 fail to validate namespace and database scope in custom API routes, allowing authenticated users to invoke endpoints in different namespaces/databases. Attackers with valid credentials for any namespace/database can access custom API endpoints in other tenants by specifying the target scope in the URL path, reading sensitive data or triggering unintended operations.

Read the publisher's advisory

osv · GHSA-3f6w-45q9-v69m

Withdrawn

## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-848m-r628-vrxw. This link is maintained to preserve external references. ## Original Description SurrealDB versions before 3.2.0 fail to validate namespace and database scope in custom API routes, allowing authenticated users to invoke endpoints in different namespaces/databases. Attackers with valid credentials for any namespace/database can access custom API endpoints in other tenants by specifying the target scope in the URL path, reading sensitive data or triggering unintended operations.

Read the publisher's advisory

osv · GHSA-848m-r628-vrxw

Published

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.

Read the publisher's advisory

Affected versions, risk and source history

Related advisories and sources

Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.

CVE-2026-63735 · CVE overview and exploitation status

EUVD-2026-45906

GHSA-3f6w-45q9-v69m

GHSA-848m-r628-vrxw

cve-program · CVE-2026-63735

euvd · EUVD-2026-45906

nvd · CVE-2026-63735

osv · GHSA-3f6w-45q9-v69m

osv · GHSA-848m-r628-vrxw

Related changes

Linked by CVE identifier

No related changes are available here.

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 19 Nov 14:01 UTC · 273 of 275 readable · 269 fully read · documentation 469/469 current