SurrealDB before 3.1.0 Memory Amplification via /sql WebSocket
cve-program · CVE-2026-63750
PublishedSurrealDB versions before 3.1.0 fail to apply the SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE limit to anonymous /sql WebSocket connections, allowing attackers to buffer unbounded frames in the per-connection read buffer. Attackers can stream WebSocket frames larger than the configured limit across multiple concurrent connections to consume excessive memory and degrade /sql availability.
Read the publisher's advisoryeuvd · EUVD-2026-45921
PublishedSurrealDB versions before 3.1.0 fail to apply the SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE limit to anonymous /sql WebSocket connections, allowing attackers to buffer unbounded frames in the per-connection read buffer. Attackers can stream WebSocket frames larger than the configured limit across multiple concurrent connections to consume excessive memory and degrade /sql availability.
Read the publisher's advisorynvd · CVE-2026-63750
PublishedSurrealDB versions before 3.1.0 fail to apply the SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE limit to anonymous /sql WebSocket connections, allowing attackers to buffer unbounded frames in the per-connection read buffer. Attackers can stream WebSocket frames larger than the configured limit across multiple concurrent connections to consume excessive memory and degrade /sql availability.
Read the publisher's advisoryosv · GHSA-65rj-r9fh-jp2v
PublishedAn 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. ### 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. ### Patches 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. ### 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.
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2026-63750 · CVE overview and exploitation status
cve-program · CVE-2026-63750
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-65rj-r9fh-jp2v
- https://www.vulncheck.com/advisories/surrealdb-before-memory-amplification-via-sql-websocket
euvd · EUVD-2026-45921
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-65rj-r9fh-jp2v
- https://www.vulncheck.com/advisories/surrealdb-before-memory-amplification-via-sql-websocket
nvd · CVE-2026-63750
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-65rj-r9fh-jp2v
- https://www.vulncheck.com/advisories/surrealdb-before-memory-amplification-via-sql-websocket
osv · GHSA-65rj-r9fh-jp2v
Related changes
Linked by CVE identifierNo related changes are available here.