Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify internet-exposed SurrealDB /sql endpoint
-
DeliveryOpen many concurrent anonymous WebSocket connections
-
ExploitStream frames up to 64 MiB each without authentication
-
ExecutionFill per-connection read buffers before check_anon fires
-
PersistExhaust server memory across connection pool
-
ImpactOOM-kill process or degrade /sql availability
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires unauthenticated network access to a SurrealDB instance with the /sql WebSocket endpoint reachable - anonymous connections are accepted by default on this path, requiring no credentials, session tokens, or prior account creation. No special configuration, user interaction, or privileged position in the network is necessary. The key limiting factor is attacker resource commitment: sustaining meaningful memory pressure requires high-bandwidth streaming across many concurrent connections simultaneously; a single connection or a brief burst is insufficient to cause practical availability impact. Deployments protected by a reverse proxy that blocks WebSocket upgrades to /sql, or that restrict access to /sql to authenticated network segments, are not exploitable through this vector. Confidentiality and integrity are unaffected regardless of exploitation outcome. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms unauthenticated network exploitation with no special attack requirements, consistent with the description - anonymous connections are accepted by default on the /sql WebSocket endpoint. However, the impact ceiling is availability-only at the vulnerable-system level (VA:L), with no confidentiality or integrity impact. No EPSS score was provided in the source data. There is no CISA KEV listing and no known public exploit code, meaning this is not a confirmed actively exploited vulnerability. The practical exploitation constraint is material: sustained high-bandwidth streaming across many concurrent connections is required to consume meaningful memory; a single connection or packet burst cannot trigger the condition. On well-resourced deployments with ample memory headroom, impact may be negligible. On memory-constrained or heavily loaded instances, OOM-kill and restart cycles are the realistic worst-case outcome - disruptive but not persistent data loss. The combination of PR:N (no auth) and network exposure elevates urgency for internet-facing SurrealDB instances, while the high resource demand on the attacker side moderates the risk relative to simpler DoS primitives. |
| Exploit ScenarioDerived | An unauthenticated attacker opens hundreds of concurrent WebSocket connections to the /sql endpoint of an internet-accessible SurrealDB instance and continuously streams large frames - approaching the 64 MiB library default per connection - at sustained bandwidth. The server accumulates all in-flight bytes in per-connection read buffers before check_anon fires, pinning gigabytes of memory across the connection pool. On a memory-constrained deployment, the surrealdb process is OOM-killed and restarts repeatedly during the attack, denying /sql availability to legitimate clients for the duration. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 20, 2026
Pre-authentication memory amplification in SurrealDB before 3.1.0 allows unauthenticated network attackers to exhaust server memory by streaming oversized WebSocket frames to the /sql endpoint, which fails to enforce the operator-configured SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE limit before buffering incoming bytes. The /sql WebSocket upgrade handler accepts anonymous connections and accumulates up to 16 MiB per frame and 64 MiB per reassembled message in per-connection read buffers - the full WebSocket library default - before the authentication check (check_anon) can reject the payload, meaning memory cost is incurred regardless of whether the caller holds any SurrealQL permissions. No public exploit has been identified at time of analysis, but the unauthenticated network-accessible attack surface requires no special prerequisites beyond network connectivity and sustained bandwidth.
RemediationAI
The primary fix is upgrading to SurrealDB 3.1.0 or later, which resolves both the size-limit bypass and the capability-check bypass by performing operator deny-flag checks before calling on_upgrade and applying the same per-connection frame size limits used by the /rpc endpoint. The fix commit is https://github.com/surrealdb/surrealdb/commit/899967e6a9cf064c88a4bc4b35ea7e2da28a6411, and the full advisory is GHSA-65rj-r9fh-jp2v. For operators unable to upgrade immediately, the vendor-endorsed workaround is to refuse GET /sql requests carrying an Upgrade: websocket header at a reverse proxy (e.g., nginx location block with a deny for websocket upgrades); this eliminates the attack surface entirely but disables WebSocket-mode SurrealQL querying on /sql, forcing clients to use the HTTP or /rpc WebSocket path instead. Alternatively, applying per-connection frame size limits at the reverse proxy layer preserves WebSocket functionality while bounding the memory a single connection can consume, though this is a partial mitigation if the proxy's own frame-size defaults remain generous.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in cargo
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SurrealDB is a multi-model database server written in Rust (rust/surrealdb package) that exposes SurrealQL query endpoints over both HTTP and WebSocket. The vulnerable component is the /sql WebSocket upgrade handler, which accepts anonymous connections and routes them through the WebSocket protocol layer before invoking check_anon for authentication. The root cause (CWE-770: Allocation of Resources Without Limits or Throttling) is that the SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE environment variable - intended to cap per-connection frame sizes - was never propagated to the WebSocket protocol layer in this code path. Consequently, the underlying WebSocket library defaults (16 MiB per frame, 64 MiB per reassembled message) govern buffer allocation. A secondary defect - that --deny-http sql and --deny-arbitrary-query * operator flags were silently ignored for authenticated callers on this same upgrade path - is a configuration-correctness issue that does not grant new permissions and is lower severity. Affected package: rust/surrealdb < 3.1.0 per GHSA-65rj-r9fh-jp2v.
Know when Surrealdb gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Network-accessible anonymous endpoint with no auth; availability impact is partial and requires sustained attacker bandwidth, so A:L; no C/I impact.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
1DescriptionCVE.org
SurrealDB 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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica
SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed
Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act
Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo
SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow
Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an
Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read
SurrealDB releases before 4.0.0 fail to check query capability inside the embedded JavaScript bridge, so a low-privilege
SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete
Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a
Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web
EUVD-2026-45921
GHSA-qg3v-r4m7-x5f5
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB