CVE-2024-58368: Surrealdb Uncaught Exception Processing HTTP Headers Vulnerability

HIGH
Advisory Identifier: GHSA-m24x-r6q3-2vp9
CVSS 7.5
Published
Advisory Summary

CVE-2024-58368 is a HIGH (CVSS 7.5) uncaught exception processing http headers vulnerability (General Security Weakness) affecting Surrealdb libraries in the crates.io ecosystem. The issue involves uncaught exception processing http headers in surrealdb. Remediation is available by upgrading affected packages to version 1.1.0.

CVE-2024-58368 at a Glance

CVE Identifier CVE-2024-58368
GHSA Identifier GHSA-m24x-r6q3-2vp9
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification General Security Weakness
Affected Product Surrealdb
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-58368

To remediate this vulnerability, upgrade all affected Surrealdb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

surrealdb fixed: 1.1.0
Upgrade surrealdb to 1.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for surrealdb

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-58368, inspect your project dependencies for Surrealdb:

inspect dependencies for surrealdb

Analyze the terminal output to locate any version of Surrealdb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Surrealdb, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The `ID`, `DB` and `NS` headers accepted by the SurrealDB HTTP REST API would fail to parse when containing some special characters. This would cause a panic which would crash the SurrealDB server, leading to denial of service. This issue only affects the SurrealDB binary; it does not affect the SurrealDB library. ### Impact An unauthenticated client may issue an HTTP request to the SurrealDB HTTP REST API containing one of the affected headers with values containing special characters in order to crash the SurrealDB server. This does not require the SurrealDB server to be running with any specific capabilities other than exposing the affected interface. ### Patches - Version 1.1.0 and later are not affected by this issue. ### Workarounds Concerned users unable to update may want to limit untrusted access to the SurrealDB HTTP REST API unless such access is required by the application. 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. ### Resources - #2985 ([diff](https://github.com/surrealdb/surrealdb/pull/2985/files#diff-7ad06ddbb88d77138e5daf40a0dac5443d78947acd69a284a7c2bceb61f9c5f0L83-R119))

CVE-2024-58368 Affected Surrealdb Versions

1 component(s)
Fixed Versions:
1.1.0
Product / Package Ecosystem Affected Versions Fixed Version
surrealdb
crates.io
< 1.1.0
1.1.0

References

Frequently Asked Questions

What is CVE-2024-58368?
CVE-2024-58368 is a security vulnerability in Surrealdb involving Uncaught Exception processing HTTP Headers in SurrealDB under General Security Weakness.
Which Surrealdb versions are affected?
Affected versions include releases prior to 1.1.0 across affected packages: surrealdb.
What version fixes CVE-2024-58368?
Upgrading to 1.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is surrealdb affected?
Yes, surrealdb is affected in releases prior to 1.1.0. Upgrade your dependency to 1.1.0 or later.
What is the CVSS score of CVE-2024-58368?
CVE-2024-58368 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-58368?
CVE-2024-58368 is classified under General Security Weakness.
How can I check crates.io dependencies for CVE-2024-58368?
Run the dependency tree command: 'inspect dependencies for surrealdb'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m24x-r6q3-2vp9",
  "modified" : "2026-09-04T19:39:59Z",
  "published" : "2024-01-18T15:48:48Z",
  "aliases" : [ "CVE-2024-58368" ],
  "summary" : "Uncaught Exception processing HTTP Headers in SurrealDB",
  "details" : "The `ID`, `DB` and `NS` headers accepted by the SurrealDB HTTP REST API would fail to parse when containing some special characters. This would cause a panic which would crash the SurrealDB server, leading to denial of service.\n\nThis issue only affects the SurrealDB binary; it does not affect the SurrealDB library.\n\n### Impact\n\nAn unauthenticated client may issue an HTTP request to the SurrealDB HTTP REST API containing one of the affected headers with values containing special characters in order to crash the SurrealDB server. This does not require the SurrealDB server to be running with any specific capabilities other than exposing the affected interface.\n\n### Patches\n\n- Version 1.1.0 and later are not affected by this issue.\n\n### Workarounds\n\nConcerned users unable to update may want to limit untrusted access to the SurrealDB HTTP REST API unless such access is required by the application. 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.\n\n### Resources\n\n- #2985 ([diff](https://github.com/surrealdb/surrealdb/pull/2985/files#diff-7ad06ddbb88d77138e5daf40a0dac5443d78947acd69a284a7c2bceb61f9c5f0L83-R119))",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "surrealdb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-m24x-r6q3-2vp9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-58368"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/pull/2985"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/commit/a70ddb2e2aed2453730b81781e426486247609cb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/surrealdb/surrealdb"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/surrealdb-before-denial-of-service-via-http-headers"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-18T15:48:48Z",
    "nvd_published_at" : null
  }
}