Dasel: Selector lexer panics on trailing whitespace in `parseCurRune`
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2026-62866
PublishedDasel is a command-line tool and library for querying, modifying, and transforming data structures. From 3.0.0 until 3.11.2, selector/lexer/tokenize.go parseCurRune advances the input index across trailing whitespace and then reads the source at the exhausted index without an end-of-input check. A selector ending in whitespace, including input passed through lexer.NewTokenizer(...).Tokenize() or dasel.Query, can therefore cause an index-out-of-range panic and terminate the process. This issue is fixed in version 3.11.2.
- Source published
- 21 Sep 2026 16:51:18 UTC
- Source modified
- 21 Sep 2026 18:00:18 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
euvd · EUVD-2026-84016
PublishedDasel is a command-line tool and library for querying, modifying, and transforming data structures. From 3.0.0 until 3.11.2, selector/lexer/tokenize.go parseCurRune advances the input index across trailing whitespace and then reads the source at the exhausted index without an end-of-input check. A selector ending in whitespace, including input passed through lexer.NewTokenizer(...).Tokenize() or dasel.Query, can therefore cause an index-out-of-range panic and terminate the process. This issue is fixed in version 3.11.2.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Sep 21, 2026, 4:51:18 PM
dateUpdated: Sep 21, 2026, 6:00:18 PM
- Source published
- Sep 21, 2026, 4:51:18 PM (timezone not stated)
- Source modified
- Sep 21, 2026, 6:00:18 PM (timezone not stated)
- Saved here
- 11 Nov 2026 15:05:09 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
EUVD CVSS 3.1 · 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvd · CVE-2026-62866
PublishedDasel is a command-line tool and library for querying, modifying, and transforming data structures. From 3.0.0 until 3.11.2, selector/lexer/tokenize.go parseCurRune advances the input index across trailing whitespace and then reads the source at the exhausted index without an end-of-input check. A selector ending in whitespace, including input passed through lexer.NewTokenizer(...).Tokenize() or dasel.Query, can therefore cause an index-out-of-range panic and terminate the process. This issue is fixed in version 3.11.2.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Deferred
Weakness classifications: CWE-129
Original publisher date fields
published: 2026-09-21T17:17:38.053
lastModified: 2026-09-24T21:25:27.050
- Source published
- 21 Sep 2026 17:17:38 UTC
- Source modified
- 24 Sep 2026 21:25:27 UTC
- Saved here
- 25 Oct 2026 14:19:28 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · [email protected] · Secondary · 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
osv · GHSA-65gg-g7rw-6cpc
PublishedSame 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 library too - `dasel.Query(ctx, input, "a ")` panics the same way. Project-style test reproducer that fails on current `main`: ```go // drop into selector/lexer/ as tokenize_trailing_ws_test.go package lexer_test import ( "testing" "github.com/tomwright/dasel/v3/selector/lexer" ) func TestTokenize_TrailingWhitespacePanic(t *testing.T) { defer func() { if r := recover(); r != nil { t.Fatalf("Tokenize panicked: %v", r) } }() _, _ = lexer.NewTokenizer("a ").Tokenize() } ``` ## Impact Process crash, no auth, no preconditions. Same severity tier as the two May 13 advisories on this file. ## Affected versions All v3.x. The whitespace-skip loop was added in `78fcca9` (Dasel V3, ~9 months ago); line 60's indexing landed in `9bfe966` (~6 months ago). Reproduced on `github.com/tomwright/dasel/[email protected]`. ## Suggested fix One line, between the whitespace-skip loop and the comment-skip access. Same shape as lines 69-71: ```go func (p *Tokenizer) parseCurRune() (Token, error) { for p.i < p.srcLen && unicode.IsSpace(rune(p.src[p.i])) { p.i++ } if 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.
- Source published
- 22 Sep 2026 19:52:16 UTC
- Source modified
- 1 Oct 2026 20:55:58 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V3 · CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Publisher rating · MODERATE
osv · GO-2026-6548
PublishedDasel: Selector lexer panics on trailing whitespace in `parseCurRune` in github.com/tomwright/dasel
- Source published
- 1 Oct 2026 20:23:38 UTC
- Source modified
- 1 Oct 2026 20:45:12 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.