Improper Validation of Array Index Affecting github.com/temporalio/sqlparser package, versions <0.1.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.39% (33rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMTEMPORALIOSQLPARSER-20074854
  • published24 Sept 2026
  • disclosed21 Sept 2026

Introduced: 21 Sep 2026

NewCVE-2026-16651  (opens in a new tab)
CWE-129  (opens in a new tab)

How to fix?

Upgrade github.com/temporalio/sqlparser to version 0.1.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Validation of Array Index through the ExtractMysqlComment function in comments.go and the MySQL special-comment handling in token.go. An attacker can crash the parser by supplying a malformed MySQL version comment such as an empty /*!...*/ comment or one whose contents are only one to five decimal digits. When Parse, ParseStrictDDL, or ParseNext processes that input, ExtractMysqlComment uses the result of strings.IndexFunc as a slice boundary without checking for -1, which triggers a Go runtime panic. Applications that parse attacker-controlled SQL can terminate if that panic is not recovered, and repeated requests can sustain a denial of service.

CVSS Base Scores

version 4.0
version 3.1