GHSA-Q3GG-M8HR-H4X4

GHSA-Q3GG-M8HR-H4X4 is a high-severity security vulnerability in surrealdb (rust), affecting versions < 1.1.1. It is fixed in 1.1.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Externally Controlled Format String in Scripting Functions

The rquickjs crate used by SurrealDB implements Rust bindings to the QuickJS C library and is used to execute SurrealDB scripting functions. The rquickjs function Exception::throw_type takes a string and returns an error object. Prior to version 0.4.2 of the crate, this string would be fed directly into printf, which will receive the error string as a format string with no additional arguments, leading to undefined behavior. This issue triggers when a SurrealDB scripting function returns an error and its input contains a format string such as %s or %d.

This vulnerability can only affect SurrealDB servers explicitly enabling the scripting capability with --allow-scripting or --allow-all and equivalent environment variables SURREAL_CAPS_ALLOW_SCRIPT=true and SURREAL_CAPS_ALLOW_ALL=true.

Workarounds

Users unable to update should restrict access from untrusted users to define and execute scripting functions. This can be achieved by removing the scripting capability by default or with --deny-scripting and equivalent environment variable SURREAL_CAPS_DENY_SCRIPT=true. If not possible, network access should be limited to trusted users.

References

Impact

An attacker with privileges to execute scripting functions with arbitrary inputs may be able to exploit this format string vulnerability in order read arbitrary memory from the remote SurrealDB process. A format string vulnerability may also be further exploited to execute arbitrary code with the privileges of the SurrealDB process.

The fact that error messages are limited to 256 bytes coupled with exploit mitigation features supported in Rust executables may somewhat increase the complexity of exploiting this vulnerability to reliably achieve remote code execution in practice.

GHSA-Q3GG-M8HR-H4X4 has a CVSS score of 8.5 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.1.1); upgrading removes the vulnerable code path.

Affected versions

surrealdb (< 1.1.1)

Security releases

surrealdb → 1.1.1 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

  • Version 1.1.1 and later are not affected by this issue.

Frequently Asked Questions

  1. What is GHSA-Q3GG-M8HR-H4X4? GHSA-Q3GG-M8HR-H4X4 is a high-severity security vulnerability in surrealdb (rust), affecting versions < 1.1.1. It is fixed in 1.1.1.
  2. How severe is GHSA-Q3GG-M8HR-H4X4? GHSA-Q3GG-M8HR-H4X4 has a CVSS score of 8.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of surrealdb are affected by GHSA-Q3GG-M8HR-H4X4? surrealdb (rust) versions < 1.1.1 is affected.
  4. Is there a fix for GHSA-Q3GG-M8HR-H4X4? Yes. GHSA-Q3GG-M8HR-H4X4 is fixed in 1.1.1. Upgrade to this version or later.
  5. Is GHSA-Q3GG-M8HR-H4X4 exploitable, and should I be worried? Whether GHSA-Q3GG-M8HR-H4X4 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-Q3GG-M8HR-H4X4 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-Q3GG-M8HR-H4X4? Upgrade surrealdb to 1.1.1 or later.

Other vulnerabilities in surrealdb

Stop the waste.
Protect your environment with Kodem.