GHSA-65RJ-R9FH-JP2V

GHSA-65RJ-R9FH-JP2V is a medium-severity allocation of resources without limits or throttling vulnerability in surrealdb (rust), affecting versions < 3.1.0. It is fixed in 3.1.0.

Summary

An anonymous caller could degrade /sql availability by streaming WebSocket frames many times larger than the operator-configured per-connection limit. The /sql upgrade handler accepted anonymous connections and did not propagate SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE to the WebSocket protocol layer, incoming bytes accumulated in the per-connection read buffer before check_anon could reject the query, so the memory cost was incurred regardless of whether the caller could ever execute SurrealQL. The same upgrade path also silently ignored --deny-http sql and --deny-arbitrary-query * for authenticated callers, but that secondary effect does not grant new permissions.

Workarounds

Affected users who are unable to update should refuse GET /sql requests carrying Upgrade: websocket at a reverse proxy, or apply per-connection frame size limits at the reverse proxy.

Impact

SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE is not applied to anonymous /sql connections, so each connection can buffer up to the WebSocket library defaults (16 MiB per frame, 64 MiB per reassembled message) of in-flight bytes regardless of the operator's configured limit. Holding this much memory pinned requires actively streaming bytes into the connection, so an attacker has to maintain bandwidth across many concurrent connections to consume meaningful memory. Within that constraint the result is degraded availability for legitimate /sql clients; on memory-constrained deployments the process may be OOM-killed and restarted during the attack rather than denied service outright.

Separately, --deny-http sql and --deny-arbitrary-query * were not enforced on the WebSocket, so SurrealQL operations the operator had configured to refuse could still be issued by any authenticated principal that already held the corresponding data permissions. This is a configuration-correctness defect, the bypass does not grant new permissions.

The application allocates resources such as memory, threads, or file descriptors based on untrusted input without enforcing a cap. Typical impact: resource exhaustion leading to denial of service.

GHSA-65RJ-R9FH-JP2V has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. 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

A patch has been introduced that performs the two capability checks before calling on_upgrade and applies the same per-connection size limits used by /rpc. The capability checks enforce the operator's configured deny flags; they do not change what any authenticated principal is permitted to do.

  • Versions 3.1.0 and later are not affected by this issue.

Frequently Asked Questions

  1. What is GHSA-65RJ-R9FH-JP2V? GHSA-65RJ-R9FH-JP2V is a medium-severity allocation of resources without limits or throttling vulnerability in surrealdb (rust), affecting versions < 3.1.0. It is fixed in 3.1.0. The application allocates resources such as memory, threads, or file descriptors based on untrusted input without enforcing a cap.
  2. How severe is GHSA-65RJ-R9FH-JP2V? GHSA-65RJ-R9FH-JP2V has a CVSS score of 5.3 (Medium). 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-65RJ-R9FH-JP2V? surrealdb (rust) versions < 3.1.0 is affected.
  4. Is there a fix for GHSA-65RJ-R9FH-JP2V? Yes. GHSA-65RJ-R9FH-JP2V is fixed in 3.1.0. Upgrade to this version or later.
  5. Is GHSA-65RJ-R9FH-JP2V exploitable, and should I be worried? Whether GHSA-65RJ-R9FH-JP2V 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-65RJ-R9FH-JP2V 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-65RJ-R9FH-JP2V? Upgrade surrealdb to 3.1.0 or later.

Other vulnerabilities in surrealdb

Stop the waste.
Protect your environment with Kodem.