/

CVE-2026-63757

Severity:

HIGH RISK

(8.8)

Missing Auth Checks (CWE-306) in SurrealDB /rpc Sessions

CVE-2026-63757

Analyzed

Vulnerability type

Category:

Authentication Bypass / Session Hijacking

CWE:

CWE-306

Impact:

Unauthorized Access and Privilege Escalation

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SurrealDB exposes a session hijacking issue where the /rpc sessions method returns active session UUIDs without requiring authentication and accepts arbitrary session fields without verifying ownership.

An unauthenticated attacker who can reach the HTTP API can enumerate valid session identifiers and impersonate authenticated users, enabling unauthorized data access, modification, deletion, and potential privilege escalation.

Affected context

This vulnerability manifests in SurrealDB deployments that expose the HTTP /rpc endpoint and rely on session-based authentication for access control.

Risk increases when:

  • The /rpc sessions method is reachable over networks accessible to untrusted clients
  • Session UUIDs are used as the primary bearer credential for authenticated operations
  • No additional verification is enforced between the caller and the session being referenced

Exploit preconditions

  • Attack surface: Public or internal HTTP /rpc endpoint of SurrealDB
  • Required access: Network-level ability to send requests to /rpc without prior authentication
  • Trigger point: Invocation of the sessions method to list session UUIDs or manipulate session fields
  • Why exploitation is possible: The endpoint discloses session identifiers without authentication and accepts arbitrary session UUIDs and fields without verifying that the caller owns or is entitled to those sessions, breaking session isolation.

Why this happens

The root cause is missing authorization and ownership checks on a sensitive session management API.

The /rpc sessions method both:

  • Returns attached session UUIDs to any caller, and
  • Accepts arbitrary session fields for any session UUID presented,

effectively treating session identifiers as unprotected tokens.

This maps to CWE-306: Missing Authentication for Critical Function, where security-sensitive functionality—session enumeration and manipulation—is exposed without enforcing proper authentication and authorization boundaries.

Potential impact

  • Unauthenticated reading of data associated with hijacked sessions
  • Unauthorized modification or deletion of database records
  • Impersonation of privileged users or service accounts
  • Escalation of privileges by attaching to higher-privileged sessions
  • Disruption of application behavior through session tampering

General mitigation guidance

Mitigation focuses on enforcing strict authentication and authorization on all session-related endpoints and reducing reliance on opaque identifiers as sole credentials.

Recommended patterns include:

  • Require authenticated context for any session enumeration or manipulation functionality
  • Enforce ownership checks so only the principal that created a session can interact with it
  • Treat session UUIDs as sensitive secrets and avoid exposing them in unauthenticated responses
  • Apply least-privilege to session scopes and segregate administrative session management from general client APIs
  • Use defense-in-depth mechanisms such as short-lived session tokens and additional verification steps for high-privilege actions

How teams detect issues like this

Detection typically involves examining API definitions and access control policies for session management operations.

Effective strategies include:

  • Static analysis or configuration review to flag endpoints that expose session identifiers or accept session IDs without authentication or authorization checks
  • Code review checklists focusing on critical functions such as login, session creation, enumeration, and attachment to existing sessions
  • Logging and monitoring of /rpc sessions usage to identify anomalous patterns, such as frequent enumeration or attachment attempts from unauthenticated sources
  • Automated security testing or API fuzzing to validate that session-related methods consistently enforce authentication and ownership constraints

Sources

SourceLink
github.comgithub.com/surrealdb/surrealdb/security/advisories/GHSA-5qfp-32cf-69jh
vulncheck.comvulncheck.com/advisories/surrealdb-before-session-hijacking-via-rpc-sessions

Frequently asked

questions

Yes. If the SurrealDB HTTP /rpc endpoint is reachable from untrusted networks, an attacker can remotely exploit the sessions method to hijack valid sessions.

Only network access to the /rpc endpoint is required; no prior authentication is needed to enumerate session UUIDs or attach to existing sessions under vulnerable configurations.

Enforce mandatory authentication and authorization on all session-related operations, ensure that session enumeration is restricted or disabled, and implement strict ownership checks so that a caller can only interact with its own sessions.

Apply consistent access control patterns to all critical functions, treat session identifiers as confidential tokens, use security-focused API design reviews, and incorporate automated checks that flag unauthenticated or unverified access to sensitive session, authentication, and authorization endpoints.

Find out what's already
exploitable in your codebase.