Loading...
Skip to main content

CVE-2025-71391

HIGH

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

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

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

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, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (3)

PackageEcosystemAffectedFixed In
surrealdb
crates.io
All versions2.1.5
surrealdb
crates.io
All versions2.2.2
surrealdb
crates.io
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. 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 has limited impact. Remediate within weeks.

Also Known As

GHSA-rq86-9m6r-cm3g

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies