GHSA-5QFP-32CF-69JH

GHSA-5QFP-32CF-69JH is a high-severity security vulnerability in surrealdb (rust), affecting versions < 3.1.0. It is fixed in 3.1.0.

Summary

The HTTP /rpc sessions method returned every attached session UUID without authentication, and the /rpc handler accepted an arbitrary session field with no ownership check. An anonymous caller could enumerate UUIDs and impersonate any authenticated session.

"Attached" means sessions registered via {"method":"attach"}, the only writer to the HTTP session map. Ordinary stateless /rpc requests use ephemeral per-request sessions that are filtered from sessions() and destroyed at end-of-request, so they are not enumerable.

Exposure

  • Exposed: clients that issue attach, notably the official Rust SDK's Http/Https engine (auto-attaches once per Surreal handle).
  • Not exposed: REST endpoints (/sql, /key, /signin, /export, etc.); WebSocket /rpc (per-connection scope, attach refused); embedded / MCP usage; ad-hoc POST /rpc callers that never attach.

Workarounds

No configuration-level mitigation fully addresses this. For Users unable to upgrade:

  • Avoid SDKs and client flows that call attach against HTTP /rpc (notably the Rust SDK's Http/Https engine). Prefer the WebSocket transport, or REST endpoints (/sql, /signin, /key, /export) which never populate the attached-session map.
  • Restrict /rpc to trusted clients at the network layer.

Impact

For each attached and authenticated session, an unauthenticated attacker can read, write, and delete any data the session can reach, dump metadata, invalidate sessions, and escalate to that session's privilege level (up to root). An attached session that has not yet authenticated is Level::No and confers no privilege.

GHSA-5QFP-32CF-69JH has a CVSS score of 8.8 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.1.0); upgrading removes the vulnerable code path.

Affected versions

surrealdb (< 3.1.0)

Security releases

surrealdb → 3.1.0 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

  1. HTTP sessions() now returns method_not_allowed. WebSocket retains per-connection enumeration.
  2. The HTTP /rpc handler gates client-supplied session IDs against the caller's request-level auth principal (actor id + level); mismatches return session_not_found.
  3. Attached HTTP sessions are capped via SURREAL_HTTP_MAX_ATTACHED_SESSIONS.

Versions 3.1.0 and later are not affected.

Frequently Asked Questions

  1. What is GHSA-5QFP-32CF-69JH? GHSA-5QFP-32CF-69JH is a high-severity security vulnerability in surrealdb (rust), affecting versions < 3.1.0. It is fixed in 3.1.0.
  2. How severe is GHSA-5QFP-32CF-69JH? GHSA-5QFP-32CF-69JH has a CVSS score of 8.8 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of surrealdb are affected by GHSA-5QFP-32CF-69JH? surrealdb (rust) versions < 3.1.0 is affected.
  4. Is there a fix for GHSA-5QFP-32CF-69JH? Yes. GHSA-5QFP-32CF-69JH is fixed in 3.1.0. Upgrade to this version or later.
  5. Is GHSA-5QFP-32CF-69JH exploitable, and should I be worried? Whether GHSA-5QFP-32CF-69JH is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-5QFP-32CF-69JH is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-5QFP-32CF-69JH? Upgrade surrealdb to 3.1.0 or later.

Other vulnerabilities in surrealdb

Stop the waste.
Protect your environment with Kodem.