SurrealDB Embedded JavaScript Function Capability Bypass (CVE-2026-134292)
Detects potential exploitation of CVE-2026-134292, a capability check bypass (CWE-862, CVSS 9.3) in SurrealDB versions 1.0.0 before 4.0.0. The embedded JavaScript scripting engine's surrealdb.functions bridge calls internal built-in functions without re-applying the configured function capability checks. An authenticated user denied access to restricted built-ins in SurrealQL can call them from within a JavaScript function body and bypass the server's function-capability enforcement. Detection focuses on SurrealQL/HTTP activity that defines or invokes JavaScript functions and on the downstream network effects of bypassed built-ins.
Vulnerability Intelligence
TheoreticalWeakness (CWE)
Timeline
- Disclosed
- November 21, 2026
CVSS
What is CVE-2026-134292 SurrealDB Embedded JavaScript Function Capability Bypass (CVE-2026-134292)?
SurrealDB Embedded JavaScript Function Capability Bypass (CVE-2026-134292) (CVE-2026-134292) maps to the Stealth and Execution tactics — the adversary is trying to hide and conceal their actions, appearing as normal behavior in MITRE ATT&CK.
This page provides production-ready detection logic for SurrealDB Embedded JavaScript Function Capability Bypass (CVE-2026-134292), covering the data sources and telemetry it touches: Syslog, IIS/Reverse-proxy logs, Container stdout logs. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
// df00tech DF00-6f10b6fa17 · https://df00tech.com/detections/CVE-2026-134292 · licence: https://df00tech.com/detections/licence
let surrealPorts = dynamic([8000, 8080, 443]);
union isfuzzy=true
(
// SurrealDB server process emitting script-engine function activity in logs ingested as syslog/container logs
Syslog
| where ProcessName has "surreal" or SyslogMessage has "surrealdb"
| where SyslogMessage has_any ("function::script", "surrealdb.functions", "js function", "capability", "http::get", "http::post")
| where SyslogMessage has_any ("DEFINE FUNCTION", "RETURN function", "<js>", "function() {")
| project TimeGenerated, Computer, ProcessName, SyslogMessage
),
(
// HTTP requests to the SurrealDB /sql or /rpc endpoints carrying JavaScript function bodies
W3CIISLog
| where csUriStem in~ ("/sql", "/rpc", "/key")
| where csUriQuery has_any ("function()", "surrealdb.functions", "http::", "<js>")
| project TimeGenerated, Computer=sComputerName, cIP=cIP, csUriStem, csUriQuery, scStatus
)
| sort by TimeGenerated desc Surfaces SurrealDB server log lines and HTTP API requests that define or execute embedded JavaScript functions invoking restricted built-in bridges (notably http::*), the core primitive of the capability bypass.
Data Sources
Required Tables
False Positives
- Legitimate applications that define SurrealDB JavaScript functions as part of normal schema design
- Internal developers testing scripting features in a non-production SurrealDB instance
- Reverse proxies logging benign /sql queries that merely mention 'function' in field names
Query fingerprint DF00-6f10b6fa17 · licence
Sigma logsource & community rules
The detection logic for SurrealDB Embedded JavaScript Function Capability Bypass (CVE-2026-134292) (CVE-2026-134292) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: network_connection
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-134292
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 SurrealDB JS function invoking http built-in via bridge
Expected signal: SurrealDB server log line referencing surrealdb.functions and http::get; outbound connection attempt to 127.0.0.1:9999 from the surreal process.
- Test 2 DEFINE FUNCTION with embedded JS calling restricted built-in
Expected signal: DEFINE FUNCTION log event containing <js> body and surrealdb.functions.crypto:: reference.
- Test 3 SurrealDB RPC JS scripting invocation
Expected signal: Reverse-proxy/access log for POST /rpc with surrealdb.functions and http::post in the body; SurrealDB log of JS execution.
Response Playbook
Triage
- Confirm the SurrealDB server version: versions 1.0.0 up to (but not including) 4.0.0 are vulnerable. Check the running binary with `surreal version` or the /version HTTP endpoint.
- Determine whether the embedded JavaScript scripting engine is enabled and whether function capabilities (allow/deny lists) are configured; the bypass only matters when restricted built-ins are supposed to be denied.
- Review the flagged query/log line: identify which built-in (http::, crypto::, etc.) was invoked through the surrealdb.functions bridge and whether it corresponds to a function the capability policy intended to deny.
- Identify the authenticated principal / source IP that submitted the JavaScript function and whether it is an expected application identity.
Containment
- Upgrade SurrealDB to 4.0.0 or later, where the capability check is re-applied in the JS functions bridge.
- As an interim mitigation, disable the embedded JavaScript scripting engine (do not start the server with scripting enabled) or enforce `--deny-functions` / capability flags and restrict network egress from the SurrealDB host.
- Rotate any credentials, API keys, or secrets that may have been reachable via bypassed crypto::/http:: built-ins.
Evidence Collection
- Capture the full SurrealQL statement(s) and JavaScript function bodies from server logs and any reverse-proxy /sql and /rpc access logs.
- Preserve outbound network connection logs from the SurrealDB host for the relevant window to assess http:: exfiltration or SSRF.
- Export the SurrealDB configuration (capability flags, scripting setting) and version metadata.
Escalation Criteria
- ! Escalate to incident response if a bypassed http:: call reached an internal or external host, indicating SSRF or data exfiltration.
- ! Escalate if the invoking principal is unexpected or the function was defined outside a sanctioned deployment process.
- ! Escalate if the affected instance holds sensitive data and scripting with capability restrictions was supposed to be enforced.
Investigation Guide
Forensic Artifacts
- >
SurrealDB server logs containing DEFINE FUNCTION / <js> statements and surrealdb.functions bridge calls - >
Reverse-proxy or IIS access logs for /sql and /rpc endpoints - >
Host network connection records showing egress from the surreal process
Tuning Guidance
Baseline the set of SurrealDB JavaScript functions legitimately defined by your applications and allow-list them by function name/hash or defining principal. Raise severity when the invoking identity is unexpected or when a bypassed http:: call is followed by egress to a non-allowlisted destination. Suppress alerts from known staging/test SurrealDB instances where scripting is intentionally enabled without capability restrictions.
Hunting Queries
Hunt for any SurrealDB JavaScript function invoking restricted built-ins through the bridge over a wide time window.
// df00tech DF00-6f10b6fa17 · https://df00tech.com/detections/CVE-2026-134292 · licence: https://df00tech.com/detections/licence
Syslog | where SyslogMessage has "surrealdb.functions" and SyslogMessage has_any ("http::", "crypto::") | project TimeGenerated, Computer, SyslogMessage ``` df00tech DF00-6f10b6fa17 · https://df00tech.com/detections/CVE-2026-134292 · licence: https://df00tech.com/detections/licence ```
index=db sourcetype=surrealdb:log "surrealdb.functions" ("http::" OR "crypto::") | stats count by host, _raw Atomic Red Team Tests
Defines and runs a SurrealQL JavaScript function that calls an http:: built-in through the surrealdb.functions bridge to simulate the capability bypass.
Command
curl -s -X POST http://127.0.0.1:8000/sql -u root:root -H 'Accept: application/json' -H 'surreal-ns: test' -H 'surreal-db: test' --data "RETURN function() { return await surrealdb.functions['http::get']('http://127.0.0.1:9999/canary'); };" Cleanup
curl -s -X POST http://127.0.0.1:8000/sql -u root:root -H 'surreal-ns: test' -H 'surreal-db: test' --data 'REMOVE FUNCTION fn::test;' 2>/dev/null || true Expected Telemetry
SurrealDB server log line referencing surrealdb.functions and http::get; outbound connection attempt to 127.0.0.1:9999 from the surreal process.
Expected Detection
KQL/SPL rules match on the surrealdb.functions + http:: pattern; EQL sequence links the bridge call to egress.
Persists a JavaScript-backed SurrealDB function that invokes a crypto built-in through the bridge.
Command
curl -s -X POST http://127.0.0.1:8000/sql -u root:root -H 'surreal-ns: test' -H 'surreal-db: test' --data "DEFINE FUNCTION fn::bypass() { RETURN function() { return surrealdb.functions['crypto::md5']('x'); }; };" Cleanup
curl -s -X POST http://127.0.0.1:8000/sql -u root:root -H 'surreal-ns: test' -H 'surreal-db: test' --data 'REMOVE FUNCTION fn::bypass;' 2>/dev/null || true Expected Telemetry
DEFINE FUNCTION log event containing <js> body and surrealdb.functions.crypto:: reference.
Expected Detection
Log-based rules match DEFINE FUNCTION + surrealdb.functions + crypto:: pattern.
Uses the /rpc endpoint to send a JavaScript function that references the functions bridge, simulating API-driven exploitation.
Command
curl -s -X POST http://127.0.0.1:8000/rpc -u root:root -H 'Content-Type: application/json' --data '{"method":"query","params":["RETURN function() { return surrealdb.functions[\"http::post\"](\"http://127.0.0.1:9999\", {}); };"]}' Cleanup
echo 'no persistent artifact to clean' Expected Telemetry
Reverse-proxy/access log for POST /rpc with surrealdb.functions and http::post in the body; SurrealDB log of JS execution.
Expected Detection
IIS/W3C and SPL rules match /rpc requests carrying surrealdb.functions + http:: content.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Stealth
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040