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.
Summary
AItemporalio/sqlparser can produce deeply nested syntax trees from SQL and overflow the Go stack when an application later formats or walks them. Temporal Server passes caller-controlled queries through the parser; in a supported authenticated deployment, a caller with namespace read permission can terminate a Frontend or Matching process through affected validation paths. The confirmed ListWorkers route also requires at least one retained worker heartbeat, and repeated requests can sustain a denial of service.
Who should check
Teams running Temporal Server or applications using temporalio/sqlparser should check their deployments; affected versions were not provided.
What to do
- 1Consult the vendor advisory for affected versions and fixes.
- 2Apply the vendor-provided fix when available.