CyberSecBulletin
CVE-2024-58362NVD status: Analyzed

surrealdb: Failure to Sanitize Special Elements into a Different Plane

CVE-2024-58362 is a high-severity failure to sanitize special elements into a different plane vulnerability in surrealdb, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. The record lists versions 1.5.5, 2.0.0-beta.3, 1.5.2 as the first without the flaw, so updating surrealdb to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.64% chance of exploitation within 30 days, higher than 51% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update surrealdb to 1.5.5 or 2.0.0-beta.3 or 1.5.2, whichever matches your release line, or a later version.
  2. Read the advisory on github.com for workarounds and exact fixed builds.

Affected products and versions

VendorProductAffected versionsFixed in
Surrealdbsurrealdbbefore 1.5.5; 2.0.0-beta.1 up to, but not including, 2.0.0-beta.3; before 1.5.21.5.5, 2.0.0-beta.3, 1.5.2

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by CNA (vulncheck.com).

Scoring systemScoreSeverityScored by
CVSS 4.08.7HighCNA (vulncheck.com)
CVSS 3.18.8HighCNA (vulncheck.com)

Official description

SurrealDB before 1.5.5 (and 2.0.0-beta before 2.0.0-beta.3) accepts an arbitrary object in the signin and signup operations of the RPC API without recursively validating it for non-computed values. When a record access method defines a SIGNIN or SIGNUP query and the RPC API is exposed to untrusted users, an unauthenticated attacker can encode a binary object containing a subquery using the bincode serialization format and supply it in place of credentials. The subquery is then executed within the database owner's SIGNIN/SIGNUP query under a system user session with the editor role, allowing the attacker to select, create, update, and delete non-IAM resources (though not view the query results directly, and not affect IAM resources, which require the owner role).

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Failure to Sanitize Special Elements into a Different Plane

The product does not adequately filter user-controlled input for special elements with control implications.

How developers prevent this class of flaw

  • Programming languages and supporting technologies might be chosen which are not subject to these issues.
  • Utilize an appropriate mix of allowlist and denylist parsing to filter special element syntax from all input.

More Failure to Sanitize Special Elements into a Different Plane vulnerabilities (CWE-75)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Third-party and government advisories

Other vulnerabilities in surrealdb

All surrealdb vulnerabilities

Recent Failure to Sanitize Special Elements into a Different Plane vulnerabilities

Spotted an error? Tell us.