Description
temporalio/sqlparser accepts SQL containing deeply nested unary expressions and can return a correspondingly deep abstract syntax tree without enforcing an applicable nesting limit. The library's String and Walk operations recursively traverse that tree. An application that parses attacker-controlled SQL and later formats or walks the returned tree can encounter a runtime-fatal Go stack overflow that terminates the process; Go panic recovery cannot contain this condition. Temporal Server passes caller-controlled query input through the affected parser in archival, visibility, and worker-query paths. In affected validation paths, the Server recursively formats an invalid expression while constructing an error. In a supported authenticated deployment, a caller with namespace read permission can terminate the receiving Frontend or Matching process. The dynamically confirmed ListWorkers route additionally requires at least one retained worker heartbeat. Repeated requests can sustain a denial of service. The issue affects availability only; no confidentiality or integrity impact was identified.
Published: 2026-09-21
Score: 6 Medium
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Patch Now
AI Analysis

Impact

The flaw lies in the sqlparser library’s handling of deeply nested unary expressions. When such expressions are parsed, the library produces an abstract syntax tree of matching depth. Both the String and Walk functions then recursively traverse this tree, and the recursion depth exceeds Go’s stack limits, causing a fatal Go stack overflow. Go panic recovery cannot trap this condition, so the process terminates. Because only the availability of the affected process is impacted, no data leakage or integrity loss is observed.

Affected Systems

This issue targets Temporal Technologies, Inc. products: the Temporal Server and the temporalio/sqlparser library. Versions prior to the recommended fix are vulnerable. For the sqlparser component the recommender advises upgrading to commit 0466b6b405ac (or later releases such as 1aa...147). Temporal Server operators should apply the patch by upgrading to micro‑release 1.30.7, 1.31.3, or 1.32.0, whichever matches the deployed minor line. Earlier major or minor releases that embed the unpatched sqlparser also remain exposed.

Risk and Exploitability

The CVSS score of 6 marks this a moderate risk. No EPSS value is available, and the vulnerability is not listed in CISA’s KEV catalog. Attackers who can submit SQL to a Temporal Server endpoint that parses the query—such as archive, visibility, or worker‑query paths—can craft a query with excessive nesting. When the server subsequently formats the invalid expression or formats an error message, the stack overflow occurs and the Frontend or Matching process crashes, resulting in a denial of service. The DoS may be sustained by repeated requests when the ListWorkers route is active and an authenticated principal has namespace read permissions. The recommended mitigation is the availability patch; otherwise, conservative size limits or disabling unused paths provide temporary protection.

Generated by OpenCVE AI on September 21, 2026 at 12:24 UTC.

Remediation

Vendor Solution

Upgrade github.com/temporalio/sqlparser to v0.0.0-20260721183058-0466b6b405ac or later; v0.0.0-20260722001706-17d16cfe1da5 is the preferred upgrade. Temporal Server operators should upgrade to 1.30.7, 1.31.3, or 1.32.0, as appropriate for the deployed minor release line. The parser changes reject excessive nesting before recursive AST consumers receive an attacker-deep tree.


Vendor Workaround

Applications can impose a conservative query-size or nesting limit before parsing and avoid recursively formatting or walking parser-produced trees derived from untrusted input. Temporal Server 1.29 and 1.30 operators can disable ListWorkers when it is unused, disable unused archival reads, and restrict namespace read permission to trusted principals. Go panic recovery is not an effective mitigation for runtime-fatal stack overflow.


OpenCVE Recommended Actions

  • Upgrade github.com/temporalio/sqlparser to the version v0.0.0-20260721183058-0466b6b405ac or later; the most recent preferred patch is v0.0.0-20260722001706-17d16cfe1da5.
  • Update Temporal Server to one of the following patch releases: 1.30.7, 1.31.3, or 1.32.0, matching your deployed minor release line.
  • If upgrading is not immediately possible, constrain the size or depth of incoming SQL queries before parsing, or limit the nesting level in your application logic.
  • For Temporal Server operators running version 1.29 or 1.30, disable the ListWorkers service when it is not required, disable unused archival read APIs, and restrict namespace read permissions to trusted principals to reduce the attack surface.
  • Avoid recursively calling String or Walk on parse trees that originate from untrusted input; instead, validate or sanitize the tree before traversal.

Generated by OpenCVE AI on September 21, 2026 at 12:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 21 Sep 2026 11:45:00 +0000

Type Values Removed Values Added
Description temporalio/sqlparser accepts SQL containing deeply nested unary expressions and can return a correspondingly deep abstract syntax tree without enforcing an applicable nesting limit. The library's String and Walk operations recursively traverse that tree. An application that parses attacker-controlled SQL and later formats or walks the returned tree can encounter a runtime-fatal Go stack overflow that terminates the process; Go panic recovery cannot contain this condition. Temporal Server passes caller-controlled query input through the affected parser in archival, visibility, and worker-query paths. In affected validation paths, the Server recursively formats an invalid expression while constructing an error. In a supported authenticated deployment, a caller with namespace read permission can terminate the receiving Frontend or Matching process. The dynamically confirmed ListWorkers route additionally requires at least one retained worker heartbeat. Repeated requests can sustain a denial of service. The issue affects availability only; no confidentiality or integrity impact was identified.
Title temporalio/sqlparser deeply nested unary expressions can cause a fatal stack overflow during AST traversal
First Time appeared Temporal
Temporal temporal
Weaknesses CWE-674
CPEs cpe:2.3:a:temporal:temporal:*:*:*:*:*:*:*:*
Vendors & Products Temporal
Temporal temporal
References
Metrics cvssV4_0

{'score': 6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Temporal Temporal
cve-icon MITRE

Status: PUBLISHED

Assigner: Temporal

Published:

Updated: 2026-09-21T11:34:05.930Z

Reserved: 2026-07-22T18:08:48.925Z

Link: CVE-2026-65651

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-21T12:17:15.553

Modified: 2026-09-21T12:17:15.553

Link: CVE-2026-65651

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-21T12:30:14Z

Weaknesses