Dasel: Selector lexer panics on trailing whitespace in `parseCurRune`
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 && unicode.IsSpace(rune(p.src[p.i])) { p.i++ } // Skip over comments if p.src[p.i] == '/' && p.i+1 < p.srcLen && p.src[p.i+1] == '/' { // ... ``` Lines 69-71 right below already do the bounds check after the comment-skip path. The whitespace-only path slipped past it. ## Reproduce ``` $ echo '{"a":1}' | dasel query -i json 'a ' panic: runtime error: index out of range [2] with length 2 goroutine 1 [running]: github.com/tomwright/dasel/v3/selector/lexer.(*Tokenizer).parseCurRune(...) selector/lexer/tokenize.go:60 github.com/tomwright/dasel/v3/selector/lexer.(*Tokenizer).Next(...) github.com/tomwright/dasel/v3/selector/lexer.(*Tokenizer).Tokenize(...) github.com/tomwright/dasel/v3/selector.Parse(...) github.com/tomwright/dasel/v3/execution.ExecuteSelector(...) ``` Other inputs that hit it: `' '`, `$'a\t'`, `$'a\n'`, `'a ?? '`, `'a + '`. Any token (or no token) followed by whitespace. Reachable directly from the libra
GO-2026-6548
Revision 1
Dasel: Selector lexer panics on trailing whitespace in `parseCurRune` in github.com/tomwright/dasel
Dasel: Selector lexer panics on trailing whitespace in `parseCurRune` in github.com/tomwright/dasel
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GO-2026-6548
github.com/tomwright/dasel
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
github.com/tomwright/dasel/v2
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
github.com/tomwright/dasel/v3
Source reference: /affected/2/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 3.11.2
Source reference:
/affected/2/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "github.com/tomwright/dasel",
"purl": "pkg:golang/github.com/tomwright/dasel",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6548.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "github.com/tomwright/dasel/v2",
"purl": "pkg:golang/github.com/tomwright/dasel/v2",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6548.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.11.2"
}
]
}
],
"package": {
"name": "github.com/tomwright/dasel/v3",
"purl": "pkg:golang/github.com/tomwright/dasel/v3",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6548.json"
},
"ecosystem_specific": {}
}
]- Related CVEs
- CVE-2026-62866
Source reference:
/aliases
Publisher severity
No explicit severity was provided.
- Event
- #63830 · Revision 1
- Added to Heist Feed
- Publisher date
GHSA-65gg-g7rw-6cpc
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-65gg-g7rw-6cpc
github.com/tomwright/dasel/v3
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 3.11.2
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.11.2"
}
]
}
],
"package": {
"name": "github.com/tomwright/dasel/v3",
"purl": "pkg:golang/github.com/tomwright/dasel/v3",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-65gg-g7rw-6cpc/GHSA-65gg-g7rw-6cpc.json"
}
}
]- Related CVEs
- CVE-2026-62866
Source reference:
/aliases
Publisher severity
No explicit severity was provided.
- Event
- #63923 · Revision 1
- Added to Heist Feed
- Publisher date