Skip to content
Heist/ feed
Back to feed
High

temporalio/sqlparser deeply nested unary expressions can cause a fatal stack overflow during AST traversal

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-65651
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 20:28 UTC · Revision 1

Source evidence

temporalio/sqlparser deeply nested unary expressions can cause a fatal stack overflow during AST traversal

core-osv · Original source

Published 21 Sept 2026, 11:34 UTC

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.

osv:CVE-2026-65651
Complete source record
{
  "id": "e846e6e2b110b0d303f2ce3cabbb95f0ae593c0dd12ab61f721a726ce6a7bf1e",
  "url": "https://osv.dev/vulnerability/CVE-2026-65651",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "temporalio/sqlparser deeply nested unary expressions can cause a fatal stack overflow during AST traversal",
    "summary": "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.",
    "evidence": "osv:CVE-2026-65651",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-65651",
      "aliases": [
        "CVE-2026-65651"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/temporalio/sqlparser",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0466b6b405accfaa781e4bef417933efc18bcaef"
                },
                {
                  "fixed": "1aae9baceee8e48525da8f56b07bf6a5ca7eb147"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "0466b6b405accfaa781e4bef417933efc18bcaef"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "1aae9baceee8e48525da8f56b07bf6a5ca7eb147"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            },
            {
              "repo": "https://github.com/temporalio/temporal",
              "type": "GIT",
              "events": [
                {
                  "introduced": "b8b14483744be73d138f7d58fdcb3a2829d5b901"
                },
                {
                  "last_affected": "1f74f0c8e9935980d92a39069185671bbbba7c7e"
                },
                {
                  "introduced": "f2a389fbab69f89edfb596d4963c04664db4cf89"
                },
                {
                  "fixed": "6263d75ecb887e4b11e67dab867c8af07260f36b"
                },
                {
                  "introduced": "83881961df2bad7d78d93a2d50778dbc8bd1a2fc"
                },
                {
                  "fixed": "8c78934b67fbac43d2ea7f8ada448c539780584d"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0.10.0"
                      },
                      {
                        "last_affected": "1.29.7"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "1.30.0"
                      },
                      {
                        "fixed": "1.30.7"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "1.31.0"
                      },
                      {
                        "fixed": "1.31.3"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "fixed": "6263d75ecb887e4b11e67dab867c8af07260f36b"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.30.7"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8c78934b67fbac43d2ea7f8ada448c539780584d"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.31.3"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.31.2",
            "v1.30.6",
            "v1.30.5",
            "v1.30.4.1",
            "v1.29.7",
            "v1.29.6.1",
            "v1.31.1",
            "v1.31.0",
            "v1.30.4",
            "v1.29.6",
            "v1.30.3",
            "v1.29.5",
            "v1.29.4.1",
            "v1.30.2",
            "v1.29.4",
            "v1.30.1",
            "v1.29.3",
            "v1.30.0",
            "v1.29.2",
            "v1.29.1",
            "v1.29.0",
            "v1.29.0-142.1",
            "v1.29.0-142.0",
            "v1.29.0-135.0",
            "v1.28.0-132.0",
            "v1.28.0-130.0",
            "v1.28.0-131.0",
            "v1.28.0-129.0",
            "v1.27.0-127.0",
            "v1.27.0-126.0",
            "v1.26.2-124.0",
            "v1.26.2-123.0",
            "v1.26.2-122.0",
            "v1.26.2-121.0",
            "v1.26.1-121.0",
            "v1.26.0",
            "v1.25.0-119.0",
            "v1.26.0-120",
            "v1.25.0-rc.1",
            "v1.25.0-118.0",
            "v1.25.0-117.0",
            "v1.25.0-116.0",
            "v1.25.0-115.0",
            "v1.25.0-114.0",
            "v1.25.0-113.0",
            "v1.24.0-m3.0",
            "v1.24.0-m2.2",
            "v1.24.0-m2.1",
            "v1.24.0-m1",
            "norbert/wip",
            "norbert-109",
            "v1.23.0-rc2",
            "v1.23.0-rc1",
            "v1.23.0-rc0",
            "v1.22.0-rc1",
            "v1.20.0",
            "dummy-tag",
            "v1.18.0",
            "v1.16.0",
            "v1.15.0",
            "v1.13.0",
            "v1.12.0",
            "v1.11.0",
            "v1.10.0",
            "v1.9.0",
            "v1.8.0",
            "v1.7.0",
            "v1.0.0",
            "v1.6.0",
            "v1.5.0",
            "v1.4.0",
            "v1.1.0",
            "v1.0.0-rc1",
            "v0.31.0",
            "v0.30.0",
            "v.0.29.0",
            "v0.28.0",
            "v0.27.0",
            "v0.26.0",
            "v0.25.0",
            "v0.23.1",
            "v0.23.0",
            "v0.21.1",
            "v0.21.0",
            "v0.20.0",
            "v0.10.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-65651.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:39.109311928Z",
      "provider": "osv",
      "references": [
        "https://github.com/temporalio/sqlparser/tree/v0.1.0",
        "https://github.com/temporalio/temporal/blob/v0.10.0/common/archiver/filestore/queryParser.go#L77-L132",
        "https://pkg.go.dev",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65651.json",
        "https://github.com/temporalio/temporal/releases/tag/v1.30.7",
        "https://github.com/temporalio/temporal/releases/tag/v1.31.3",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-65651",
        "https://github.com/temporalio/sqlparser/commit/0466b6b405accfaa781e4bef417933efc18bcaef",
        "https://github.com/temporalio/sqlparser/commit/1aae9baceee8e48525da8f56b07bf6a5ca7eb147",
        "https://github.com/temporalio/sqlparser/pull/6",
        "https://github.com/temporalio/sqlparser/pull/7",
        "https://github.com/temporalio/temporal/pull/11202",
        "https://github.com/temporalio/sqlparser",
        "https://github.com/temporalio/temporal"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-674"
        ],
        "cna_assigner": "Temporal",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0.0.0-20141206041240-1aae9baceee8"
                  },
                  {
                    "fixed": "0.0.0-20260721183058-0466b6b405ac"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65651.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-65651",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 506682,
  "published_at": "2026-09-21T11:34:05.93+00:00"
}