{"id":"CVE-2026-65651","summary":"temporalio/sqlparser deeply nested unary expressions can cause a fatal stack overflow during AST traversal","details":"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.","modified":"2026-09-24T03:30:41.058752365Z","published":"2026-09-21T11:34:05.930Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65651.json","unresolved_ranges":[{"extracted_events":[{"introduced":"0.0.0-20141206041240-1aae9baceee8"},{"fixed":"0.0.0-20260721183058-0466b6b405ac"}],"source":"AFFECTED_FIELD"}],"cna_assigner":"Temporal","cwe_ids":["CWE-674"]},"references":[{"type":"WEB","url":"https://github.com/temporalio/sqlparser/tree/v0.1.0"},{"type":"WEB","url":"https://github.com/temporalio/temporal/blob/v0.10.0/common/archiver/filestore/queryParser.go#L77-L132"},{"type":"WEB","url":"https://pkg.go.dev"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65651.json"},{"type":"ADVISORY","url":"https://github.com/temporalio/temporal/releases/tag/v1.30.7"},{"type":"ADVISORY","url":"https://github.com/temporalio/temporal/releases/tag/v1.31.3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65651"},{"type":"FIX","url":"https://github.com/temporalio/sqlparser/commit/0466b6b405accfaa781e4bef417933efc18bcaef"},{"type":"FIX","url":"https://github.com/temporalio/sqlparser/commit/1aae9baceee8e48525da8f56b07bf6a5ca7eb147"},{"type":"FIX","url":"https://github.com/temporalio/sqlparser/pull/6"},{"type":"FIX","url":"https://github.com/temporalio/sqlparser/pull/7"},{"type":"FIX","url":"https://github.com/temporalio/temporal/pull/11202"},{"type":"PACKAGE","url":"https://github.com/temporalio/sqlparser"},{"type":"PACKAGE","url":"https://github.com/temporalio/temporal"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/temporalio/sqlparser","events":[{"introduced":"0"},{"fixed":"0466b6b405accfaa781e4bef417933efc18bcaef"},{"fixed":"1aae9baceee8e48525da8f56b07bf6a5ca7eb147"}],"database_specific":{"source":"REFERENCES"}},{"type":"GIT","repo":"https://github.com/temporalio/temporal","events":[{"introduced":"b8b14483744be73d138f7d58fdcb3a2829d5b901"},{"introduced":"f2a389fbab69f89edfb596d4963c04664db4cf89"},{"introduced":"83881961df2bad7d78d93a2d50778dbc8bd1a2fc"},{"fixed":"6263d75ecb887e4b11e67dab867c8af07260f36b"},{"fixed":"8c78934b67fbac43d2ea7f8ada448c539780584d"}],"database_specific":{"extracted_events":[{"introduced":"0.10.0"},{"last_affected":"1.29.7"},{"introduced":"1.30.0"},{"fixed":"1.30.7"},{"introduced":"1.31.0"},{"fixed":"1.31.3"}],"source":["AFFECTED_FIELD","REFERENCES"]}}],"versions":["v1.31.2","v1.30.6","v1.30.5","v1.30.4.1","v1.31.1","v1.31.0","v1.30.4","v1.30.3","v1.30.2","v1.30.1","v1.30.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-65651.json"}}],"schema_version":"1.9.0","severity":[{"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"}]}