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.
High severity with no evidence of exploitation so far.
What to do
- 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.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Surrealdb | surrealdb | before 1.5.5; 2.0.0-beta.1 up to, but not including, 2.0.0-beta.3; before 1.5.2 | 1.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 system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 4.0 | 8.7 | High | CNA (vulncheck.com) |
| CVSS 3.1 | 8.8 | High | CNA (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
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Third-party and government advisories
- vulncheck.com/advisories/surrealdb-before-query-injection-via-rpc-apiThird Party Advisory
Other vulnerabilities in surrealdb
- 8.1 High severity
- 7.8 High severity
- 7.1 High severity
- 8.1 High severity
- 7.1 High severity
- 8.1 High severity
Recent Failure to Sanitize Special Elements into a Different Plane vulnerabilities
- 8.1 High severity
- 9.1 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 8.8 High severity
- 7.5 High severity
Spotted an error? Tell us.