CVE-2026-63735: SurrealDB: Custom API route lets authenticated callers override namespace/database scope via URL path
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).
References
- github.com/advisories/GHSA-848m-r628-vrxw
- github.com/surrealdb/surrealdb/commit/0938f88d196dc4eb11a82af343df3fffe9c195e2
- github.com/surrealdb/surrealdb/commit/75b7154f84904d047619b5a47b08d256254dceca
- github.com/surrealdb/surrealdb/security/advisories/GHSA-848m-r628-vrxw
- nvd.nist.gov/vuln/detail/CVE-2026-63735
- www.vulncheck.com/advisories/surrealdb-before-authentication-bypass-via-custom-api
Code Behaviors & Features
Detect and mitigate CVE-2026-63735 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →