GitHub Advisoryadvisory · Go
GHSA-65gg-g7rw-6cpc Dasel: Selector lexer panics on trailing whitespace in `parseCurRune`
MEDIUM
Official page ↗
- Aliases
- CVE-2026-62866
- Ecosystem
- Go
- Packages
- github.com/tomwright/dasel/v3
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses
- CWE-129
- Reviewed
- 2026-09-22
Affected packages
• Go github.com/tomwright/dasel/v3: >= 3.0.0, < 3.11.2 → fixed in 3.11.2
Description
Same panic class as GHSA-m5j3-4634-c2vq and GHSA-m6xr-fvfg-5g64, sister site on the same function. Trigger is any selector ending in whitespace: `dasel query 'a '` panics at `selector/lexer/tokenize.go:60`.
The whitespace-skip loop right above (lines 55-57) advances `p.i` to `p.srcLen` when the input is all-whitespace or whitespace-trailing. The very next line reads `p.src[p.i]` without a bounds check.
Vulnerable code
`selector/lexer/tokenize.go:53-74` (v3.11.0):
```go
func (p *Tokenizer) parseCurRune() (Token, error) {
// Skip over whitespace
for p.i = p.srcLen {
return NewToken(EOF, "", p.i, 0), nil
}
if p.src[p.i] == '/' && p.i+1 < p.srcLen && p.src[p.i+1] == '/' {
```
Prevalence
The other two cases in this class shipped fixes two weeks ago; this one wasn't covered in those patches. I checked the rest of `parseCurRune` for other unguarded direct-access points after a `pos++` - nothing else stood out. A `testing.F` harness on `lexer.NewTokenizer(s).Tokenize()` catches all three with trivially short inputs and would close the class.
Related
Alias · CVE (1)
- CVE-2026-62866 Dasel is a command-line tool and library for querying, modifying, and transforming data structures. vulnerability
Weakness · CWE (1)
- CWE-129 Improper Validation of Array Index weakness
References
- https://github.com/TomWright/dasel/security/advisories/GHSA-65gg-g7rw-6cpc web
- https://nvd.nist.gov/vuln/detail/CVE-2026-62866 advisory
- https://github.com/TomWright/dasel/commit/eee03aec28d4a33d6138098d065b7b37b85e3c55 web
- https://github.com/TomWright/dasel package
- https://github.com/TomWright/dasel/releases/tag/v3.11.2 web