Vulnerability DatabaseCVE-2026-137488

CVE-2026-137488: 
Chainguard vulnerability analysis and mitigation

Overview

CVE-2026-137488 is an information disclosure vulnerability in SurrealDB affecting all versions before 4.0.0. Authenticated users with CREATE and UPDATE permissions on an edge table can issue a re-RELATE operation against an existing edge with mismatched endpoints, causing the database to echo the stored in/out record IDs in InOverride/OutOverride error messages — bypassing row-level and field-level SELECT restrictions. The vulnerability was published on November 26, 2026, with a patch available in SurrealDB 4.0.0. It carries a CVSS v3.1 score of 4.3 (Medium) and a CVSS v4.0 score of 5.3 (Medium) (GitHub Advisory, Feedly).

Technical details

The root cause is CWE-209 (Generation of Error Message Containing Sensitive Information) and CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor). The vulnerable code path resides in surrealdb/core/src/doc/alter.rs (function default_record_data), where the InOverride/OutOverride error arms bind the stored document's in/out field value (self.initial.doc.as_ref().pick(&IN/OUT)) and format it directly into the client-visible error message without first checking whether the caller has SELECT permission on those fields. Because the RELATE update path is reached when a caller with UPDATE permission re-RELATEs an existing edge ID with a mismatched endpoint, an attacker needs only two crafted RELATE queries per edge — one to recover in, one to recover out — with no brute force required. The bug was verified on the official v3.3.0 Docker image and confirmed by source review on the main branch (GitHub Advisory).

Impact

Successful exploitation allows an authenticated attacker to reconstruct hidden graph structure — specifically, who is related to whom — for any edge record ID they can reference, regardless of row-level (PERMISSIONS FOR select NONE on the edge table) or field-level (DEFINE FIELD in/out ... PERMISSIONS FOR select NONE) SELECT restrictions. The impact is limited to confidentiality: mismatched RELATE operations are correctly rejected, so no data is modified and availability is unaffected. In applications where relationship endpoints encode sensitive identities (e.g., user-to-resource links), this leakage could facilitate targeted attacks or privacy violations (GitHub Advisory, Feedly).

Exploitability

No public proof-of-concept exploit code has been released, and there is no evidence of in-the-wild exploitation at this time. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires authenticated access with CREATE and UPDATE permissions on a target edge table, limiting the attacker pool to insiders or compromised application accounts. A working PoC was developed by the reporter (Tan-JunWei) and submitted as part of the responsible disclosure, but has not been publicly released (GitHub Advisory, Feedly).

Exploitation steps

  1. Authenticate: Obtain credentials for a SurrealDB account that has CREATE and UPDATE permissions on a target edge table (e.g., wrote), but lacks SELECT permission on that table or its in/out fields.
  2. Identify a target edge ID: Enumerate or guess an existing edge record ID (e.g., wrote:edge77). SurrealDB record IDs are often structured and predictable.
  3. Recover the in endpoint: Issue a RELATE statement with a deliberately mismatched in value: RELATE person:unknown->wrote:edge77->book:unknown. The server returns an InOverride error embedding the stored in record ID (e.g., Found person:carol for the 'in' field).
  4. Recover the out endpoint: Re-issue the RELATE with the now-known correct in value but a mismatched out: RELATE person:carol->wrote:edge77->book:unknown. The server returns an OutOverride error embedding the stored out record ID (e.g., Found book:diary for the 'out' field).
  5. Reconstruct graph structure: Repeat for additional edge IDs to map hidden relationships, bypassing all SELECT-level access controls (GitHub Advisory).

Indicators of compromise

  • Logs: SurrealDB query logs showing repeated RELATE statements targeting the same edge record ID with varying in/out values from the same authenticated principal; error responses containing InOverride or OutOverride messages returned to a low-privilege user.
  • Behavioral: A pattern of two RELATE queries per edge ID (one mismatched in, one mismatched out) issued in rapid succession by the same session, particularly against edge tables with restrictive SELECT permissions.
  • Network: Unusual volume of RELATE operations from an application account that does not normally perform graph linking operations, especially if the account's role is read-only or limited in scope.

Mitigation and workarounds

Upgrade SurrealDB to version 4.0.0 or later, which contains a fix (commit f98750b1c0) that refuses re-RELATE operations on existing edges when the caller lacks SELECT permission on the stored edge, preventing the override error from disclosing hidden endpoints. As an interim workaround, restrict CREATE and UPDATE permissions on sensitive edge tables to only fully trusted principals, and audit row- and field-level access control configurations to minimize exposure. There is no configuration-only mitigation that fully prevents the disclosure without restricting write permissions (GitHub Advisory, Feedly).

Additional resources


Source: This report was generated using AI

Related Chainguard vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-137490HIGH8.7
  • Chainguard logoChainguard
  • surrealdb
NoYesNov 26, 2026
CVE-2026-137588HIGH7.1
  • Chainguard logoChainguard
  • cpe:2.3:a:librechat:librechat
NoYesNov 26, 2026
CVE-2026-137489MEDIUM5.3
  • Chainguard logoChainguard
  • surrealdb
NoYesNov 26, 2026
CVE-2026-137488MEDIUM5.3
  • Chainguard logoChainguard
  • surrealdb
NoYesNov 26, 2026
CVE-2026-137656LOW2.3
  • Chainguard logoChainguard
  • librechat
NoYesNov 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management