CVE-2026-63735: SurrealDB Custom API Route Lets Authenticated Vulnerability
HIGHCVE-2026-63735 is a HIGH (CVSS 8.1) custom api route lets authenticated vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting SurrealDB libraries in the crates.io ecosystem. The issue involves custom api route lets authenticated callers override namespace/database scope via url path. Remediation is available by upgrading affected packages to version 3.2.0.
CVE-2026-63735 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-63735
To remediate this vulnerability, upgrade all affected SurrealDB dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade surrealdb to 3.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for surrealdb
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-63735, inspect your project dependencies for SurrealDB:
inspect dependencies for surrealdb
Analyze the terminal output to locate any version of SurrealDB in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In SurrealDB, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-63735 Affected SurrealDB Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
surrealdb
|
crates.io |
< 3.2.0
|
3.2.0
|
References
Frequently Asked Questions
What is CVE-2026-63735?
Which SurrealDB versions are affected?
What version fixes CVE-2026-63735?
Is surrealdb affected?
What is the CVSS score of CVE-2026-63735?
What CWE is associated with CVE-2026-63735?
How can I check crates.io dependencies for CVE-2026-63735?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-848m-r628-vrxw",
"modified" : "2026-09-04T20:07:07Z",
"published" : "2026-09-04T20:07:07Z",
"aliases" : [ "CVE-2026-63735" ],
"summary" : "SurrealDB: Custom API route lets authenticated callers override namespace/database scope via URL path",
"details" : "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.\n\nThe 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`).\n\n### Impact\n\nWhat an attacker **can** do:\n\n- 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.\n- 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.\n\nWhat it **can't** do:\n\n- Reach a scope without valid credentials for some namespace/database on the instance; this is not an unauthenticated bypass.\n- Affect single-tenant deployments, or any deployment where callers already hold instance-wide (root) scope.\n\n### Patches\n\nThe 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`.\n\n- Versions 3.2.0 and later are not affected by this issue.\n\n### Workarounds\n\nUsers unable to patch should consider the following workarounds:\n\n- Disable the custom API HTTP route via capabilities where it is not required.\n- Treat separate deployments, not namespace/database boundaries, as the tenant isolation boundary on shared instances.\n- Prefer a `PERMISSIONS WHERE` clause that checks the authenticated identity over `PERMISSIONS FULL` (reduces exposure but does not restore the boundary).\n\n### Resources\n\n- [SurrealQL Documentation — DEFINE API](https://surrealdb.com/docs/surrealql/statements/define/api)\n- [SurrealDB Documentation — Capabilities](https://surrealdb.com/docs/surrealdb/security/capabilities)\n- `fix(core/api): reject cross-tenant custom API access` (included in SurrealDB 3.2.0)\n\n### Acknowledgements\n\nSurrealDB thanks [sondt99](https://github.com/sondt99) for reporting this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "surrealdb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-848m-r628-vrxw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-63735"
}, {
"type" : "WEB",
"url" : "https://github.com/surrealdb/surrealdb/commit/0938f88d196dc4eb11a82af343df3fffe9c195e2"
}, {
"type" : "WEB",
"url" : "https://github.com/surrealdb/surrealdb/commit/75b7154f84904d047619b5a47b08d256254dceca"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/surrealdb/surrealdb"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/surrealdb-before-authentication-bypass-via-custom-api"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-639", "CWE-862" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-04T20:07:07Z",
"nvd_published_at" : null
}
}