CVE-2024-58366: SurrealDB before 1.1.1 Format String via Scripting Functions
SurrealDB before 1.1.1 contains a format string vulnerability in the rquickjs Exception::throw_type function when scripting is enabled. Attackers with scripting privileges can supply format string sequences in error inputs to read arbitrary memory or execute code with SurrealDB process privileges.
Security readout for executives and security teams
Plain-English summary
A user who can run SurrealDB scripts may trigger unsafe error handling that exposes process memory or takes control of the database process. The issue affects versions before 1.1.1 when scripting is enabled. Exploitation requires privileges and specific conditions, but successful compromise could seriously affect confidentiality, integrity, and availability.
Executive priority
Treat affected, scripting-enabled production systems as an urgent remediation item. Prioritize externally reachable or sensitive-data instances and those granting scripting rights broadly. Immediate emergency response is not supported solely by current exploitation evidence, but the potential impact warrants prompt upgrade and privilege reduction.
Technical view
CVE-2024-58366 is a CWE-134 format-string flaw in rquickjs Exception::throw_type. With scripting enabled, an attacker holding scripting privileges can place format sequences in error input, potentially reading arbitrary memory or executing code with SurrealDB process privileges. The supplied CVSS 4.0 score is 9.0, with high complexity and prerequisite conditions.
Likely exposure
Exposure is highest for SurrealDB versions before 1.1.1 where scripting is enabled and reachable accounts can invoke scripting functions. Internet accessibility may increase opportunity, but network access alone is insufficient because scripting privileges and additional conditions are required. Instances with scripting disabled are not exposed through the described path.
Exploitation context
The source bundle does not report active exploitation, and the CVE is not listed as CISA KEV. Exploitation is therefore unconfirmed from the supplied evidence. The attack requires a privileged scripting context, high complexity, and prerequisite conditions, but could produce process-level code execution if successful.
Researcher notes
The vulnerable sink is identified as rquickjs Exception::throw_type. Assessment should focus on how attacker-controlled scripting errors reach that function and on process isolation surrounding SurrealDB. The supplied affected-version metadata contains ambiguous entries, so confirm exact applicability against the vendor advisory rather than extrapolating additional products or branches.
Mitigation direction
Upgrade affected SurrealDB instances to version 1.1.1 or later, following the vendor advisory.
Disable scripting until upgraded where operational requirements permit.
Restrict scripting privileges to essential, trusted identities.
Limit network access to SurrealDB using trusted application and administrative paths.
Review vendor guidance for any additional release-specific remediation or configuration requirements.
Validation and detection
Inventory every SurrealDB instance and record its exact running version.
Confirm whether scripting is enabled on each instance.
Identify accounts, services, and roles permitted to execute scripts.
Verify upgraded instances report version 1.1.1 or later.
Review relevant logs for unusual scripting errors, crashes, or unexpected process behavior.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-134: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
1ADP providers
3Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-134 · source CWE mapping
Use of Externally-Controlled Format String
Use of Externally-Controlled Format String represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.