Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-109338 Overview
CVE-2026-109338 is a denial of service vulnerability in SurrealDB versions prior to 3.3.0. Query-capable users with scripting enabled can crash the server by reading non-ASCII HTTP header values from embedded JavaScript. The abort occurs when attackers call Headers.get(), Headers.entries(), Headers.values(), or Headers.getSetCookie(), or when they return such values from fetch() endpoints. The underlying weakness is classified as uncaught exception [CWE-248], which terminates the SurrealDB server process rather than returning a controlled error to the caller.
Critical Impact
An authenticated low-privilege user with query execution rights can crash the SurrealDB server process remotely, causing full service outage for all tenants and clients.
Affected Products
- SurrealDB versions prior to 3.3.0
- Deployments with embedded JavaScript scripting enabled
- SurrealDB instances exposed to query-capable users via network endpoints
Discovery Timeline
- 2026-10-12 - CVE-2026-109338 published to the National Vulnerability Database
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-109338
Vulnerability Analysis
SurrealDB supports embedded JavaScript functions that can issue outbound HTTP requests via a fetch() API and inspect responses through a Headers interface. The vulnerability occurs when response headers contain non-ASCII byte sequences. When script code accesses these headers, the server fails to handle the decoding error and terminates the process. The flaw sits in the scripting bridge rather than the HTTP client, so any method that surfaces header values to JavaScript triggers the abort.
The condition is a server-side uncaught exception [CWE-248]. SurrealDB does not catch the panic or error path, so a single malformed header reaches the top of the runtime and halts the daemon. Recovery requires process restart, and repeated requests sustain an outage.
Root Cause
The root cause is missing error handling when non-ASCII bytes in HTTP header values are converted to JavaScript strings. The runtime assumes header values conform to ASCII, and encountering out-of-range bytes produces an unrecoverable exception. Because the error is not isolated to the invoking script context, the entire SurrealDB process exits.
Attack Vector
Exploitation requires network access to a SurrealDB endpoint and a user account authorized to execute queries containing JavaScript. The attacker crafts a script that calls fetch() against an attacker-controlled URL. The remote server returns a response with a header containing non-ASCII bytes. The script then reads the header using Headers.get(), entries(), values(), or getSetCookie(), or simply returns the response from a fetch endpoint. The read triggers the uncaught exception and aborts the SurrealDB process.
No synthetic exploit code is reproduced here. Detailed reproduction steps are available in the GitHub Security Advisory GHSA-84w9-87hm-mxqx and the VulnCheck Advisory SurrealDB DoS.
Detection Methods for CVE-2026-109338
Indicators of Compromise
- Unexpected SurrealDB process termination coinciding with execution of user-submitted scripts containing fetch() calls
- Outbound HTTP requests from the SurrealDB host to untrusted or newly observed external endpoints
- Query logs showing JavaScript functions that invoke Headers.get(), Headers.entries(), Headers.values(), or Headers.getSetCookie()
- Repeated process restarts of the SurrealDB daemon within a short interval
Detection Strategies
- Enable verbose query logging and alert on JavaScript functions issuing fetch() to external destinations
- Correlate SurrealDB service restarts with the authenticated user and query that executed immediately before termination
- Monitor supervisor or systemd restart counters for the SurrealDB unit and raise alerts on abnormal churn
Monitoring Recommendations
- Forward SurrealDB process logs and query audit trails to a centralized analytics platform for correlation
- Track outbound HTTP egress from database hosts and baseline normal destinations
- Alert on crash signatures or non-zero exit codes from the SurrealDB daemon
How to Mitigate CVE-2026-109338
Immediate Actions Required
- Upgrade SurrealDB to version 3.3.0 or later across all deployments
- Disable embedded JavaScript scripting on instances that do not require it until the upgrade is complete
- Restrict query execution permissions to trusted roles and revoke scripting capability from untrusted users
- Place SurrealDB behind an egress proxy that blocks outbound requests to untrusted destinations
Patch Information
SurrealDB resolves CVE-2026-109338 in version 3.3.0. The fix is documented in GitHub Security Advisory GHSA-84w9-87hm-mxqx. Operators should plan upgrades across production, staging, and development clusters and verify the installed version after deployment.
Workarounds
- Disable JavaScript scripting in the SurrealDB configuration if the feature is not required
- Enforce network egress controls to prevent fetch() calls from reaching attacker-controlled servers
- Limit database roles so that only trusted principals can define or execute scripted functions
- Configure a process supervisor to auto-restart SurrealDB and alert on repeated crashes while patching is scheduled
# Verify installed SurrealDB version
surreal version
# Upgrade to the patched release
# (example using the official install script)
curl -sSf https://install.surrealdb.com | sh -s -- --version 3.3.0
# Restart the service and confirm the new version
systemctl restart surrealdb
surreal version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

