# SurrealDB unauthenticated remote DoS in RPC use handler

Source: https://junglewise.ai/threats/surrealdb-unauthenticated-remote-dos-in-rpc-use-handler-295d4555  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-01. Updated: 2026-07-01  
License: CC BY 4.0 with a link back

Severity: high · CVSS 7.5 · Published 2026-07-01

SurrealDB is a multi-model cloud database. A vulnerability in its remote communication protocol allows an unauthenticated attacker to crash the database server with a single specially crafted message. This results in a complete denial of service, potentially disrupting all applications and services relying on the database.

Technologies: [surrealdb (crates.io)](https://junglewise.ai/threats/technologies/surrealdb). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 7.5, published 1 July 2026.

**Which products and versions are affected?** surrealdb (crates.io) < 3.1.0.

**Is there a fix for This vulnerability?** A patch was published on 2026-07-01: Version 3.1.0 released with fix Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run surrealdb (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A vulnerability exists in the SurrealDB RPC handler where a WebSocket message calling the `use` method with a database (`db`) parameter, but without a previously established namespace (`ns`), triggers an unhandled panic. Specifically, the code calls `.expect()` on a None value in `surrealdb-core/src/rpc/protocol.rs`. Because the project is compiled with `panic = 'abort'`, this panic immediately terminates the entire server process. The attack requires no authentication or special capabilities, as the `use` method is accessible to guest callers by default. The issue is resolved in version 3.1.0 by returning a proper error response instead of panicking.

## Affected products

- SurrealDB surrealdb < 3.1.0

## Timeline

- 2026-05-27: disclosed: Initial disclosure by researcher
- 2026-07-01: advisory: GitHub Advisory published
- 2026-07-01: patched: Version 3.1.0 released with fix

## References

- [https://github.com/surrealdb/surrealdb/security/advisories/GHSA-wjjj-24cx-f28g](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-wjjj-24cx-f28g)
- [https://github.com/surrealdb/surrealdb/commit/1537ec4fbd789c61a5b43b648a854577dbe31a34](https://github.com/surrealdb/surrealdb/commit/1537ec4fbd789c61a5b43b648a854577dbe31a34)
- [https://api.github.com/repos/surrealdb/surrealdb/security-advisories/GHSA-wjjj-24cx-f28g](https://api.github.com/repos/surrealdb/surrealdb/security-advisories/GHSA-wjjj-24cx-f28g)

## Related threats

- [SurrealDB use-after-free in KV backends via affinitypool spawn_local](https://junglewise.ai/threats/cve-2026-121417-surrealdb-before-3-3-0-contains-a-use-after-free-vulnerability)
- [SurrealDB JSON parser denial of service via uncontrolled recursion](https://junglewise.ai/threats/surrealdb-json-parser-denial-of-service-via-uncontrolled-recursion-3037f8a0)
- [SurrealDB ES512 algorithm silently downgraded to ES384](https://junglewise.ai/threats/surrealdb-es512-algorithm-silently-downgraded-to-es384-f0af29b8)
- [SurrealDB permission bypass via WHERE clause evaluation](https://junglewise.ai/threats/surrealdb-permission-bypass-via-where-clause-evaluation-afa6f001)
- [SurrealDB authorization bypass in KILL statement](https://junglewise.ai/threats/surrealdb-authorization-bypass-in-kill-statement-fc230d0f)
