Skip to main content

CVE-2025-71391 — SurrealDB has uncaught exception in surrealdb

HIGH

SurrealDB has uncaught exception in Net module that leads to database crash

Published April 10, 2025Updated July 19, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.56%). Schedule for your next planned update.

Does your project use an affected surrealdb version?

Paste your Cargo.lock to check it for CVE-2025-71391 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

Summary

A vulnerability was found where an attacker can crash the database via crafting a HTTP query that returns a null byte. The problem relies on an uncaught exception in the net module, where the result of the query will be converted to JSON before showing as the HTTP response to the user in the /sql endpoint.

Impact

This vulnerability allows any authenticated user to crash a SurrealDB instance by sending a crafted query with a null byte to the /sql endpoint.

Where SurrealDB is used as an application backend, it is possible that an application user can crash the SurrealDB instance and thus the supported application through crafted inputs that exploit this attack vector.

Patches

A patch has been introduced that ensures the error is caught and converted as an error.

  • Versions 2.2.2, 2.1.5 and 2.0.5 and later are not affected by this isssue

Workarounds

Affected users who are unable to update may want to limit the ability of untrusted clients to run arbitrary queries in the affected versions of SurrealDB. To limit the impact of the denial of service, SurrealDB administrators may also want to ensure that the SurrealDB process is running so that it can be automatically re-started after a crash.

Where SurrealDB is used as an application backend, ensure sanitisation of input at the application layer to prevent injection attacks.

References

https://github.com/surrealdb/surrealdb/pull/5647

Advisory Timeline

  • First published April 10, 2025 (596 days ago).
  • Last revised July 19, 2026 — 464 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update surrealdb to 2.1.5 or later
cargo update -p surrealdb --precise 2.1.5
Cargo
Update surrealdb to 2.2.2 or later
cargo update -p surrealdb --precise 2.2.2
Cargo
Update surrealdb to 2.0.5 or later
cargo update -p surrealdb --precise 2.0.5

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: crates.io (1).

PackageFixed In
surrealdb crates.io · Affected: All versions2.1.5
surrealdb crates.io · Affected: All versions2.2.2
surrealdb crates.io · Affected: All versions2.0.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2025-71391?
SurrealDB has uncaught exception in Net module that leads to database crash. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 6.5/10).
How do I check if my project is affected by CVE-2025-71391?
CVE-2025-71391 affects surrealdb. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-71391 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.5

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.56%
EPSS percentile: 40

This is a below-median EPSS score — only 40% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-rq86-9m6r-cm3g

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock